This section describes the widgets in the Abaqus GUI Toolkit that allow the user to specify a value within certain bounds. The following topics are covered:
The AFXSlider widget provides a handle that the user can drag to set a value using only the mouse. AFXSlider extends the capability of the FXSlider widget by providing the following:
An optional title.
Minimum and maximum range labels.
The ability to display the current value above the drag handle.
slider = AFXSlider(p, None, 0, AFXSLIDER_INSIDE_BAR|AFXSLIDER_SHOW_VALUE|LAYOUT_FILL_X) slider.setMinLabelText('Min') slider.setMaxLabelText('Max') slider.setDecimalPlaces(1) slider.setRange(20, 80) slider.setValue(50)
The AFXSpinner widget combines a text field and two arrow buttons. The arrows increment the integer value shown in the text field. AFXSpinner extends the capability of the FXSpinner widget by providing an optional label. For example,
spinner = AFXSpinner(p, 4, 'AFXSpinner:') spinner.setRange(20, 80) spinner.setValue(50)
The AFXFloatSpinner widget is similar to the AFXSpinner widget, but it allows floating point values.