Example frame with one box where the user can increase or decrease a number and the shown value will be updated accordingly.
import ROOT
def __init__(self, parent, width, height):
self.fExit.SetCommand('TPython::Exec( "raise SystemExit" )')
0, 99999)
self.fNumber.Connect("ValueSet(Long_t)", "TPyDispatcher", self.fLabelDispatch, "Dispatch()")
self.fNumber.GetNumberEntry().Connect("ReturnPressed()", "TPyDispatcher", self.fLabelDispatch, "Dispatch()")
self.SetWindowName("Number Entry")
self.MapSubwindows()
self.Resize(self.GetDefaultSize())
self.MapWindow()
self.Cleanup()
self.fLabel.SetText(
ROOT.Form(
"%d" % self.fNumber.GetNumberEntry().GetIntNumber()))
self.fGframe.Layout()
if __name__ == "__main__":
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Author
- Wim Lavrijsen
Definition in file numberEntry.py.