fsleyes_widgets.numberdialog
This module provides the NumberDialog class, a dialog which
allows the user to enter a number.
- class fsleyes_widgets.numberdialog.NumberDialog(parent, real=True, title=None, message=None, initial=None, minValue=None, maxValue=None, okText=None, cancelText=None)[source]
Bases:
DialogA
wx.Dialogwhich prompts the user for a number.This class differs from the
wx.NumberEntryDialogin that it supports floating point numbers.A
NumberDialogcontains awx.FloatSpinCtrland Ok/Cancel buttons, allowing the user to specify a number. If the user pushes the Ok button, the number they entered will be accessible via theGetValue()method.Create a
NumberDialog.- Parameters:
parent – The
wxparent object.real – If
True, a floating point number will be accepted. Otherwise, only integers are accepted.title – Dialog title.
message – If not None, a
wx.StaticTextlabel is added, containing the message.initial – Initial value.
minValue – Minimum value.
maxValue – Maximum value.
okText – Text for OK button. Defaults to “Ok”.
cancelText – Text for Cancel button. Defaults to “Cancel”
- property floatSpinCtrl
Returns a reference to the
FloatSpinCtrl.
- property okButton
Returns a reference to the ok
Button.
- property cancelButton
Returns a reference to the cancel
Button.