Cross Platform Cut / Paste

BlitzMax Forums/MaxGUI Module/Cross Platform Cut / Paste

TeraBit(Posted 2006) [#1]
Hi All,

Is there a cross platform method of getting / setting text on the clipboard knocking around anywhere?

I've seen one floating around for windows, but I'd like one that works on the others too. (Set/GetClipboardText should be a part of MaxGUI really if it's really cross platform! (mumble mumble))

It's for the custom Text edit control I am doing, as it needs some way to be platform independant to be useful.

Evem just the Mac one would be a start.


fredborg(Posted 2006) [#2]
GadgetCopy + GadgetPaste, you can make a hidden textarea and use those.


TeraBit(Posted 2006) [#3]
Yeah, I was thinking about that, but hoping not to have to do it with other gadgets.

Still it seems like the most likely candidate..


Regular K(Posted 2006) [#4]
Maybe you could look at the GadgetCut/GadgetPaste code and cut out the parts you need?


Raph(Posted 2007) [#5]
So I just tried fredborg's suggestion, and it works under Windows anyway:



However -- doing this automatically seems to give the textfield gadget focus.

As it happens, I need to do this with a non-GUI app (meaning a regular Graphics window, not a canvas), and cross-platform. How do I give the graphics window focus again?