select text, change cursor position, multiline string gadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

select text, change cursor position, multiline string gadget

Post by nsstudios »

Unless I'm missing something, there's currently no native function to set the position of the edit cursor, e.g., stringGadget(0, 0, 0, 300, 300, "test") setGadgetCursorPosition(0, 2) and the cursor would be over letter s, not at the beginning of content.
(function name just provided for the sake of demonstration, I don't really mind what it actually gets to be called)

Also, I don't think there's a native function for selecting/highlighting a part/whole content inside string/editor gadget, which would be really useful.

Also, it would be awesome if multiline string gadget was natively supported cross-platform, or editor gadget had a native flag to stop it from taking over the tab key, because as a screen user, taking over the tab key makes it very inconvenient to navigate past it, because I basically have to shift tab to get to gadgets that come after it.

I think these features would make PB's gadget support even more complete.
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: select text, change cursor position, multiline string ga

Post by Shardik »

You are right that a lot of PB-native cross-platform functions are still missing. But you may take a look into my list of links to cross-platform API examples which demonstrate examples for a lot of missing functions. If you only need the Windows parts, just delete the parts for MacOS and Linux... :wink:
nsstudios
Enthusiast
Enthusiast
Posts: 274
Joined: Wed Aug 28, 2019 1:01 pm
Location: Serbia
Contact:

Re: select text, change cursor position, multiline string ga

Post by nsstudios »

Thanks, that could prove useful!
:)
Post Reply