RadioButton

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

RadioButton

Previous pageReturn to chapter overviewNext page

Inserts a Radiobutton into the document. Before inserting a Radiobutton, you need to insert a Radiobutton Group into the document.

method TVPEObject VPE.RadioButton(

TVPEObject RadioButtonGroup,

VpeCoord Left,

VpeCoord Top,

VpeCoord Right,

VpeCoord Bottom,

integer Value

)

TVPEObject RadioButtonGroup

the Radiobutton Group Object you want to associate the Radiobutton with

VpeCoord Left, Top, Right, Bottom

position and dimensions

integer Value

the value the Radiobutton shall represent within its group

Returns:

The VPE Object which represents the control. This VPE Object can be used later in your code to, for example, set the input focus on it or to retrieve its value and to change some of its properties.

Remarks:

VPE offers several methods to attach an object's position to margins and relative to the position of previously inserted objects. In addition Text, Rich Text and Picture objects are able to compute their dimensions automatically depending on their visual content.
For details please see "Dynamic Positioning" in the Programmer's Manual.

Example:

// Create a Radiobutton Group, where the button which represents

// the value "2" shall be initially selected

Dim GroupObj as TVPEObject

GroupObj = Doc.RadioButtonGroup(2)

 

// Create three Radiobuttons and associate each with the group

Doc.RadioButton(GroupObj, 1, 1, -0.5, -0.5, 1)

Doc.Print(Doc.nRight + 15, VTOP, "lives in forrest")

 

Doc.RadioButton(GroupObj, VLEFT, Doc.nBottom + 0.5, -0.5, -0.5, 2)

Doc.Print(Doc.nRight + 15, VTOP, "lives on boat")

 

Doc.RadioButton(GroupObj, VLEFT, Doc.nBottom + 0.5, -0.5, -0.5, 3)

Doc.Print(Doc.nRight + 15, VTOP, "lives in house")

 

.NET:

use Doc.nTop and Doc.nLeft instead of VTOP and VLEFT in the example above

 

See also:

"Interactive Documents" in the Programmer's Manual.