Min and max values for TGNumberEntry integers

I want to use the TGNumbeEntry widget in a UI for large integers.
From the description I get the impression that if the style is set to kNESInteger, the widget works with Long_t integers and when set to kNESHex, it works with ULong_t integers.
However, I do not succeed to make it work properly for large values.

E.g, if I use SetIntNumber (for kNESInteger) to set it to 10716527521433915, then the GetIntNumber returns a value of 107165275, as if only the first 9 characters are used. If I click one of the little arrow buttons to increase or decrease the value, then a value appears in the text entry with two minus signs.

Similar problems occur for kNESHex.

Is there a limitation on the size of the numbes that can be handled with this widget? Is this documented somewhere?

I would like to use this widget, e.g., to get the VME64 adresses of some hardware modules.


I just took a look in the code, and I see that kNESInteger works with Int_t, and kNESHex with UInt_t…
GetIntNumber returns a Long_t type because it can be any format (e.g. time)

– Bertrand.

And GetHexNumber returns an ULong_t for the same reason?
That is then probably the confusing thing.
It might be a good idea to document this.
I also tried to look in the code, but I did not quite understand what is going on there.

Anyhow, apparently the TGNumberEntry is not a good choice for 64 bit integers. Could you suggest an alternative widget that can be used easily, or should I construct something myself?

Well, I can take a look to see how to extend it for Long_t numbers (in a backward compatible way). But in the meanwhile, you can create your own class inheriting from TGNumberEntry and extend it to handle Long_t…

Best, Bertrand.

OK, thanks for the suggestion.