Hello,
I'm searching for a very little thing.
Is it possible to add a shortcut for each of the choices in a EasyStruct requester ?
For example, I have a
struct EasyStruct
with es_GadgetFormat = "Yes|No".
Is it possible to add a shortcut Y or N for respectively Yes and No choices ?
I still try
es_GadgetFormat = "_Yes|_No". but no effect, except to write _Yes and _No in my requester.
Nevertheless, I found in the ADCD2.1 autodocs that
left Amiga-V select the left choice
and
left Amiga-B select the right choice.
"the key strokes left Amiga V and
left Amiga B correspond to selecting the requester's leftmost or rightmost
gadgets with the mouse, respectively."
It works but it's not really intuitive.
For info, it's not included in my SDK autodocs but it works on my system.
See you and thank by advance for your replys
Shortcuts in EasyStruct.es_GadgetFormat
Shortcuts in EasyStruct.es_GadgetFormat
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: Shortcuts in EasyStruct.es_GadgetFormat
@zzd10h
I *think* the underscore technique ("_Yes|_No") was only introduced for GadTools and BOOPSI gadgets (such as those in the ReAction set). Intuition components (such as the Easy Requester) may have never supported it.
I *think* the underscore technique ("_Yes|_No") was only introduced for GadTools and BOOPSI gadgets (such as those in the ReAction set). Intuition components (such as the Easy Requester) may have never supported it.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: Shortcuts in EasyStruct.es_GadgetFormat
I don't think so.zzd10h wrote: I'm searching for a very little thing.
Is it possible to add a shortcut for each of the choices in a EasyStruct requester ?
We generally encourage programmers to use requester.class instead. I know it isn't quite as easy but the user experience is a lot richer.
I noticed most use the "easy" requesters as a fallback if something goes seriously wrong because they are very primitive and don't use a lot of system resources. They are more of a last resort these days.
ExecSG Team Lead
Re: Shortcuts in EasyStruct.es_GadgetFormat
Yep, AFAIK the keyboard shortcuts in the EasyRequesters are "hard coded" and can't be changed.trixie wrote:may have never supported it.
X1000|II/G4|440ep|2000/060|2000/040|1000
Re: Shortcuts in EasyStruct.es_GadgetFormat
Thank all for your reply,
I have to look to the struct orRequest, if I understand well.
Hoping that it's not to much complicated for me
I have to look to the struct orRequest, if I understand well.
Hoping that it's not to much complicated for me
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: Shortcuts in EasyStruct.es_GadgetFormat
TimedDosRequester is quite good for a lot of cases - it's a bit easier than using requester.class directly.
Re: Shortcuts in EasyStruct.es_GadgetFormat
Gazelle just send me the solution to my problem without to change my EasyRequest and it works,
Thank you Gazelle.
The solution is to use ESF_TAGGED with the tag ESA_Underscore.
I add a "_" to my GadgetFormat sentence and now it works !!!
requestKill.es_Flags = ESF_TAGGED ;
struct TagItem requester_tags[2] ;
requester_tags[0].ti_Tag = ESA_Underscore;
requester_tags[0].ti_Data = '_';
requester_tags[1].ti_Tag = TAG_DONE;
requestKill.es_TagList = requester_tags ;
requestKill.es_GadgetFormat = GetCatalogStr(catalog,MSG_Requester_choix_01,MSG_Requester_choix_01_STR) ; /* _Oui|_Non */
It's easier that to use the requester class and for now this easystruct is enough for my need.
This solution was in the Autodocs but I didn't see it,
sorry for this "RTFM"
Thank you Gazelle.
The solution is to use ESF_TAGGED with the tag ESA_Underscore.
I add a "_" to my GadgetFormat sentence and now it works !!!
requestKill.es_Flags = ESF_TAGGED ;
struct TagItem requester_tags[2] ;
requester_tags[0].ti_Tag = ESA_Underscore;
requester_tags[0].ti_Data = '_';
requester_tags[1].ti_Tag = TAG_DONE;
requestKill.es_TagList = requester_tags ;
requestKill.es_GadgetFormat = GetCatalogStr(catalog,MSG_Requester_choix_01,MSG_Requester_choix_01_STR) ; /* _Oui|_Non */
It's easier that to use the requester class and for now this easystruct is enough for my need.
This solution was in the Autodocs but I didn't see it,
sorry for this "RTFM"
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: Shortcuts in EasyStruct.es_GadgetFormat
Good to know.zzd10h wrote:The solution is to use ESF_TAGGED with the tag ESA_Underscore.
I add a "_" to my GadgetFormat sentence and now it works !!!
Well, it isn't on the wiki yet. See http://wiki.amigaos.net/index.php/Intui ... RequestersThis solution was in the Autodocs but I didn't see it,
sorry for this "RTFM"
And any requester.class documentation is missing entirely.
Any help with fixing up the wiki would be greatly appreciated.
ExecSG Team Lead
Re: Shortcuts in EasyStruct.es_GadgetFormat
edit ; bad format
Last edited by zzd10h on Fri Nov 02, 2012 11:12 pm, edited 1 time in total.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: Shortcuts in EasyStruct.es_GadgetFormat
Certainly that it's not for myself (regarding my knowledge about Amiga and english, but if it was...)Any help with fixing up the wiki would be greatly appreciated.
something like this for the easystruct wiki (taken from autodocs and sample) ?
Code: Select all
struct EasyStruct
{
ULONG es_StructSize;
ULONG es_Flags;
UBYTE *es_Title;
UBYTE *es_TextFormat;
UBYTE *es_GadgetFormat;
};
es_Flags
Set to zero.
Since v51, can take 4 values
ESF_SCREEN - open the requester on the screen specified
in es_Screen (if that is NULL, the default
public screen will be used). (V50)
ESF_TAGGED - read and use the additional information
provided via es_TagList. (V50)
(see below for example of ESF_TAGGED and es_TagList use)
ESF_EVENSIZE - make all requester buttons the same width,
i.e. as wide as the widest one. (V50)
ESF_INACTIVE - open the requester window in inactive
state, preventing it from stealing the
user input focus. (V51)
es_TagList is a TagItem struct who can contain 2 tags.
Usable, only if es_Flags = ESF_TAGGED
ESA_Position - (UWORD) The on-screen position the requester is to
be opened at. The possible choices are:
REQPOS_DEFAULT - use position from user preferences
REQPOS_CORNER - top left screen corner
REQPOS_BELOWBAR - top left corner, below the screen titlebar
REQPOS_CENTERMOUSE - center under the mouse pointer
REQPOS_CENTERSCREEN - center in visible screen clip
REQPOS_CENTERWINDOW - center in supplied reference window
(if this is NULL, center in screen)
ESA_Underscore - (TEXT) The character used in the gadget format
string to indicate that the following letter must be displayed
underscored and act as a gadget keyboard shortcut. If this tag
is not present, no underscoring is performed for compatibility.
Example :
struct TagItem requester_tags[3] ;
requester_tags[0].ti_Tag = ESA_Position; /* allow to specify where the requester window will be displayed */
requester_tags[0].ti_Data = REQPOS_CENTERWINDOW; /* position the requester window at the center of the application window */
requester_tags[1].ti_Tag = ESA_Underscore; /* allow to specify a shortcut character for the es_GadgetFormat choices*/
requester_tags[1].ti_Data = '_'; /* the letter following a '_' character will be a shortcut */
requester_tags[2].ti_Tag = TAG_DONE; /* end of the tags list */
myES.es_Flags = ESF_TAGGED ; /* allow the use of ESA_Position and ESA_Underscore tags */
myES.es_TagList = requester_tags ;
myES.es_GadgetFormat = "_Yes|_No" ; /* the requester will display 2 choices with 2 shortcuts ('Y' for Yes and 'N' for No) */
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE