[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with Strings in the Clipboard
[Thread Prev] | [Thread Next]
- Subject: Re: Problem with Strings in the Clipboard
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Mon, 19 Jan 2026 17:56:07 +0000
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Mon, 19 Jan 2026 at 17:46, Claus Dietrich <claus.dietrich@xxxxxxxxxx> wrote: > Am 19.01.26 um 15:30 schrieb Gianluigi: > > Hi Claus, > > > > I probably didn't understand > > And if you do this: > > [code]Public Sub Form_Open() > > > > TextArea1.Text = "https://www.gambas-buch.de" > > > > End > > > > Public Sub Button1_Click() > > > > If Clipboard.Type = Clipboard.Text Then > > Clipboard.Copy(TextArea1.Text, "text/html") > > ' Clipboard.Copy(TextArea1.Text, "text/plain") > > TextArea2.Text = Clipboard.Paste() > > Endif > > > > End[/code] > > > > With Best Regards > > Gianluigi > > Then the result is ok. > > Here a summary of my observations and conclusions: > > 1 If the Source is a Gambas TextArea: > > a) the context-menu-item "copy" of the TextArea delivers a HTML > page to the clipboard. Why is that? > > b) the function Clipboard.Copy(TextArea1.Text) delivers text to > the clipboard. > > 2. If the source is external (i.e. Writer) the > function Clipboard.Paste() may return Null. > > The only way to always obtain usable text from the clipboard was the use > of Clipboard.Paste("text/plain") - for whatever reason. > > Best regards > > Claus > > P.S: My observation about URLs and my interpretation of "Support for > URIs" was wrong. It seems that I was "lost in the woods". Yes you got it Claus :) Clipboard.Paste() with no mime parameter will use whatever mime Clipboard.Format is. I find it odd a TextArea copies as html by default. A TextLabel i would understand but not a TextArea But i would assume this is not a gambas issue but just how the underlying toolkits work. Respects BruceS
| Problem with Strings in the Clipboard | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
| Re: Problem with Strings in the Clipboard | Lee <t.lee.davidson@xxxxxxxxx> |
| Re: Problem with Strings in the Clipboard | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
| Re: Problem with Strings in the Clipboard | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: Problem with Strings in the Clipboard | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |