Difference between revisions of "Optiongroup"

From Lianjapedia
Jump to: navigation, search
(Methods)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
 +
 +
====Description====
 +
Shown below in a standalone [[Form]].  Click the image to see in a [[Custom_Sections_and_Gadgets|Custom Section]] in a Lianja [[Page Attributes|Page]].
 +
 +
[[{{ns:file}}:optionbutton_optiongroup.png|link={{filepath:optionbutton_optiongroup_cs.png}}|Optionbutton, Optiongroup]]
 +
 +
Optiongroups are labelled containers for [[Optionbutton]] controls.  Optionbuttons in the group act like radio buttons with a single button on (True) and all other buttons in the group off (False).
 +
 
====Properties====
 
====Properties====
  
 
This class supports the [[:Category:Common_Properties|Common Properties]] plus the following:
 
This class supports the [[:Category:Common_Properties|Common Properties]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Property
 
!width="20%"|Property
 
!Access (R/RW)
 
!Access (R/RW)
 
!Value
 
!Value
 
!width="50%"|Description
 
!width="50%"|Description
 +
|-
 +
|ButtonCount
 +
|RW
 +
|Numeric
 +
|Number of option buttons in the group.  Note: adds the specified number of buttons.
 
|-
 
|-
 
|Caption
 
|Caption
 
|RW
 
|RW
|
+
|Character
|
+
|Text displayed in the optiongroup frame
 +
|-
 +
|Flat
 +
|RW
 +
|Boolean
 +
|Whether the optiongroup frame is flat or raised
 
|-
 
|-
 
|Value
 
|Value
 
|RW
 
|RW
|
+
|Numeric
|
+
|Number of the currently selected option button
 
|-
 
|-
|Buttoncount
+
|Exclusive
 
|RW
 
|RW
|
+
|Boolean
|
+
|Whether checkbox or optionbutton is used
 
|-
 
|-
|Flat
+
|Multiselect
 +
|RW
 +
|Boolean
 +
|Whether multiple selections can be made
 +
|-
 +
|Layoutdirection
 +
|RW
 +
|Boolean
 +
|Vertical or Horizontal
 +
|-
 +
|Choicelist
 
|RW
 
|RW
|
+
|Character
|
+
|Comma separated list of button captions
 
|-
 
|-
 
|}
 
|}
Line 35: Line 64:
 
This class supports the [[:Category:Common_Methods|Common Methods]] plus the following:
 
This class supports the [[:Category:Common_Methods|Common Methods]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Method
 
!width="20%"|Method
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|Addobject
+
|valign="top"|AddObject
|
+
|valign="top"|existing as Object | newobject as Character, class as Character
|
+
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified
 
|-
 
|-
|Removeobject
+
|valign="top"|Buttons
|
+
|valign="top"|button as Numeric
|
+
|valign="top"|Return an object reference to the specified option button
 
|-
 
|-
|Buttons
+
|valign="top"|RemoveObject
|
+
|valign="top"|existing as Object
|
+
|valign="top"|Remove the specified object
 
|-
 
|-
 +
|valign="top"|AddButton
 +
|valign="top"|Caption as text
 +
|valign="top"|Add a new button
 +
|-
 +
|valign="top"|AddButtons
 +
|valign="top"|Comma separated list of captions
 +
|valign="top"|Add new buttons
 +
|-
 +
|valign="top"|Clear
 +
|valign="top"|
 +
|valign="top"|Remove all buttons
 +
|-
 +
 
|}
 
|}
  
 
====Events====
 
====Events====
  
This class supports the '''Common events''' plus the following:
+
This class supports the [[:Category:Common_Events|Common Events]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Event
 
!width="20%"|Event
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 
+
|-
 +
|valign="top"|click
 +
|valign="top"|button as Numeric
 +
|valign="top"| Occurs when a button in the group is clicked
 +
|-
 
|}
 
|}
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Framework Classes]]
 
[[Category:Framework Classes]]

Latest revision as of 02:11, 24 August 2022

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Description

Shown below in a standalone Form. Click the image to see in a Custom Section in a Lianja Page.

Optionbutton, Optiongroup

Optiongroups are labelled containers for Optionbutton controls. Optionbuttons in the group act like radio buttons with a single button on (True) and all other buttons in the group off (False).

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
ButtonCount RW Numeric Number of option buttons in the group. Note: adds the specified number of buttons.
Caption RW Character Text displayed in the optiongroup frame
Flat RW Boolean Whether the optiongroup frame is flat or raised
Value RW Numeric Number of the currently selected option button
Exclusive RW Boolean Whether checkbox or optionbutton is used
Multiselect RW Boolean Whether multiple selections can be made
Layoutdirection RW Boolean Vertical or Horizontal
Choicelist RW Character Comma separated list of button captions

Methods

This class supports the Common Methods plus the following:

Method Args Description
AddObject existing as Object | newobject as Character, class as Character Add an existing object or a new object, in which case the object's class must also be specified
Buttons button as Numeric Return an object reference to the specified option button
RemoveObject existing as Object Remove the specified object
AddButton Caption as text Add a new button
AddButtons Comma separated list of captions Add new buttons
Clear Remove all buttons

Events

This class supports the Common Events plus the following:

Event Args Description
click button as Numeric Occurs when a button in the group is clicked