Editing Spin Boxes
To include a spin box in your panel, you will need to insert the spin box and then specify the type of item you want to appear in the spin box.
Inserting a Spin Box
To insert a spin box (IlvSpinBox) in your panel:
-
In the top pane of the Palettes panel, click Gadgets.
The Gadgets palette is displayed in the bottom pane of the Palettes panel.
-
Click the spin box gadget and drag it to the Gadgets buffer window.
-
Double-click the spin box gadget to display its inspector.
-
Use the Spin Box inspector to edit the items that appear in the spin box.
The Specific page of the inspector allows you to add fields to the spin box, specify the values that appear in the fields and specify how the spin arrows appear in the spin box.
Setting the Type of Spin Box Item
The default item in the spin box gadget is an IlvTextField object. By using the Spin Box editing mode, you can specify the type of gadget object that appears as a spin box item. For example, you may want to have an IlvNumberField as the spin box item rather than an IlvTextField.
To set an IlvNumberField as the item in a spin box, do the following:
-
Drag a spin box gadget from the Palettes panel to the Gadgets buffer window.
-
Double-click the spin box gadget to display the Spin Box inspector.
-
Click the Specific tab to display the Specific page.
-
Select the IlvTextField item in the Fields box.
-
Click the Remove icon below the Fields box.
The item is removed along with its settings defined in the other fields of the inspector.
-
In the upper pane of the Palettes panel, click Miscellaneous.
The Miscellaneous palette is displayed in the bottom pane of the Palettes panel.
-
Click the IlvNumberField gadget and drag it to the Gadgets buffer window.
-
Click the Spin Box icon in the Editing Modes toolbar.
-
Drag a line from the number field gadget to the spin box gadget.
-
The spin box now contains the number field and you can specify the settings for the item in the spin box inspector.