VpeRadioButton

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

VpeRadioButton

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.

VpeHandle VpeRadioButton(

VpeHandle hDoc,

VpeHandle hControlRadioButtonGroup,

VpeCoord x,

VpeCoord y,

VpeCoord x2,

VpeCoord y2,

int value

)

VpeHandle hDoc

Document Handle

VpeHandle hControlRadioButtonGroup

the handle of the Radiobutton Group object you want to associate the Radiobutton with

VpeCoord x, y, x2, y2

position and dimensions

int value

the value the Radiobutton shall represent within its group

Returns:

The VPE Object handle of the control. This handle can be used later in your code to identify the object (for example, to 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

VpeHandle hGroup = VpeRadioButtonGroup(hDoc, 2);

 

// Create three Radiobuttons and associate each with the group

VpeRadioButton(hDoc, hGroup, 1, 1, -0.5, -0.5, 1);

VpePrint(hdoc, nRight(hDoc) + 15, VTOP, "lives in forrest");

 

VpeRadioButton(hdoc, hGroup, VLEFT, nBottom(hDoc) + 0.5, -0.5, -0.5, 2);

VpePrint(hdoc, nRight(hDoc) + 0.15, VTOP, "lives on boat");

 

VpeRadioButton(hDoc, hGroup, VLEFT, nBottom(hDoc) + 0.5, -0.5, -0.5, 3);

VpePrint(hDoc, nRight(hDoc) + 0.15, VTOP, "lives in house");

 

See Also:

"Interactive Documents" in the Programmer's Manual.