TGNumberEntry modification or feature

Dear GUI experts

I need an object the behaves exactly like TGNumberEntry but has an option to make the up/down buttons visible/invisible.

many thanks

Hi Igor,

The class you are looking for is TGNumberEntryField (see root.cern.ch/root/htmldoc/TGNumb … Field.html). I included (in July) short information on the page 398 of the User’s Guide. I am going to review and improve the reference guide documentation of GUI classes in ROOT soon.

Cheers, Ilka

[quote=“antcheva”]Hi Igor,

The class you are looking for is TGNumberEntryField (see root.cern.ch/root/htmldoc/TGNumb … Field.html). I included (in July) short information on the page 398 of the User’s Guide. I am going to review and improve the reference guide documentation of GUI classes in ROOT soon.

Cheers, Ilka[/quote]

Sorry, I had to changed my first post.
The TGNumberEntryField is a good one. and perhaps I will have to use it, unless there is a way to have a visible/invisible buttons TGNumberEntry

Hi Igor,

[quote]The TGNumberEntryField is a good one. and perhaps I will have to use it, unless there is a way to have a visible/invisible buttons TGNumberEntry[/quote]Why do you need that? The purpose of up-down buttons is to make possible a selection by mouse via scrolling through the set of meaningful predefined choices. TGNumberEntryField offers the same via using the up-down keyboard arrows. Making those buttons visible/invisible looks like blocking/unblocking the user interaction with a mouse for some reason. Or, if it is something else, you have to provide more details.

Cheers, Ilka

[quote=“antcheva”]Hi Igor,

[quote]The TGNumberEntryField is a good one. and perhaps I will have to use it, unless there is a way to have a visible/invisible buttons TGNumberEntry[/quote]Why do you need that? The purpose of up-down buttons is to make possible a selection by mouse via scrolling through the set of meaningful predefined choices. TGNumberEntryField offers the same via using the up-down keyboard arrows. Making those buttons visible/invisible looks like blocking/unblocking the user interaction with a mouse for some reason. Or, if it is something else, you have to provide more details.

Cheers, Ilka[/quote]

Dear Ilka
blocking/unblocking has only one goal in my current understanding {i agree, that it may sound peculiar and unfunny}.
I have in one tab ~20 of TGNumberEntry objects. and in order to see if up/down buttons are usefull or not, i need to rewrite the whole code relevant to defining, constructing, deeleting instead of toggling one feature. it’s not a complain. may be (!) this feature might be (!) not useless (!) on the development stage.

of coarse there might be more elegant ways of doing what i have in mind.
anyway thanks for your help and comments

Hi Igor,

May be you could use both classes in your design. For getting/setting the values in a certain range, TGNumberEntry is a good candidate, because users can easily change the value using the mouse. For getting/setting values in a wide range - the TGNumberEntryField is better choice because it guides users to type a value directly, not to scroll over predefined choices. As an example I am providing the ‘Set parameters’ dialog of TF1. There for parameter’s value is used TGNumberEntry, for ‘Min’ and ‘Max’ paremeter bounds - TGNumberEntryField(s).

Cheers, Ilka