Is there a way to make a string object read only YET still allow to click in to copy the text? I don't want the user to be able to type or delete characters, but still copy the string to paste somewhere else (text editor).
I would imagine it would need a hook and ignore all input (except double click to select all, then Copy).
This would make for a nice addition to the class.
STRINGA_NoInput, TRUE,
Windows has this very handy feature; we need it.
StringObject ReadOnly
StringObject ReadOnly
Workbench Explorer - A better way to browse drawers
Re: StringObject ReadOnly
You can right-click and copy from the context menu, even in read-only/disabled string gadgets. You're forced to copy the entire string though, I don't know if this is good enough for your needs?mritter0 wrote:Is there a way to make a string object read only YET still allow to click in to copy the text? I don't want the user to be able to type or delete characters, but still copy the string to paste somewhere else (text editor).
I would imagine it would need a hook and ignore all input (except double click to select all, then Copy).
Re: StringObject ReadOnly
People's natural instinct is to click in the gadget. If nothing happens then they probably won't try to do anything else. I don't think I would. A flashing cursor would tell me I can do things; even if limited.
So no, it is not good enough for my needs. This is one of the only ways a programmer can output data to the user to copy/paste into other apps (or the same app). Maybe I don't want/need to copy the entire string box. Don't limit me.
Come on, developers. Get your creative juices flowing and start pumping out some improvements for ReAction. YOU are holding US back.
So no, it is not good enough for my needs. This is one of the only ways a programmer can output data to the user to copy/paste into other apps (or the same app). Maybe I don't want/need to copy the entire string box. Don't limit me.
Come on, developers. Get your creative juices flowing and start pumping out some improvements for ReAction. YOU are holding US back.
Workbench Explorer - A better way to browse drawers
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: StringObject ReadOnly
A tool tip would help here. I'm not sure if the menu is available in read only mode though anyway.People's natural instinct is to click in the gadget. If nothing happens then they probably won't try to do anything else. I don't think I would. A flashing cursor would tell me I can do things; even if limited.
Clearly that is not remotely the case as I just coppied and pasted your original message with no read only string gadgets involvedSo no, it is not good enough for my needs. This is one of the only ways a programmer can output data to the user to copy/paste into other apps (or the same app).
Your limiting yourself here, by not investigating the other ways to do this. You might want to consider the texteditor.gadget as a way of presenting text.Maybe I don't want/need to copy the entire string box. Don't limit me.
Reaction has gone through many many improvements, and surelt there is more to do, but outbursts like that are hardly motivating.Come on, developers. Get your creative juices flowing and start pumping out some improvements for ReAction. YOU are holding US back.
Get *your* creative juices flowing and code solutions.
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: StringObject ReadOnly
BTW another option for displaying textual info might be via a text.datatype object.
Re: StringObject ReadOnly
It is; I checked before I wrote my original comments.broadblues wrote:A tool tip would help here. I'm not sure if the menu is available in read only mode though anyway.People's natural instinct is to click in the gadget. If nothing happens then they probably won't try to do anything else. I don't think I would. A flashing cursor would tell me I can do things; even if limited.
Re: StringObject ReadOnly
I use this with GA_ReadOnly,FALSE, so the cursor is active.
I don't want the screen to beep in error since there isn't one.
Adding SHK_BlOCKINPUT to STRINGA_HookType would be nice.
Code: Select all
uint32
BlockInputHookFunc(struct Hook *hook,struct SGWork *sgw,uint32 *msg)
{
if (*msg==SGH_KEY)
{
sgw->Actions &= ~SGA_BEEP;
sgw->Actions &= ~SGA_USE;
return(~0L);
}
return(0);
}
Adding SHK_BlOCKINPUT to STRINGA_HookType would be nice.
Workbench Explorer - A better way to browse drawers