Search:     Advanced search

function NewRadioButton(Left, Top, Caption)

Article ID: 315
Last updated: 24 Sep, 2010
Views: 873
Posted: 12 Dec, 2008
by Thomas B.
Updated: 24 Sep, 2010
by Murray D.

 

Description:

Creates a new radio button. (Returns an object of class TRadioButton.)

Notes:

Parameters

Left ( This is an integer value for the left position of the radio button on the form.)

Top (This is an integer value for the top position of the radio button on the form.)

Caption (This is a string value for the caption of the radio buttion.)

Checked (Optional - default is false)

Possible values: True, 1, False, 0

If true is selected the the radio button will be selected by default.

This example would create a sample form with the name label, and two radio buttons for select of New Area or Continue with existing?. Copy and paste code into a New PlanSwift Script.

Pascal Example:

Form := NewForm(230,150, 'Sample Form')
NewLabel(26,23,'Name')
NewEdit(60,20, 'New Area')
radiobutton := NewRadioButton(26,48, 'New Area',1)
radiobuttion.width := 200
radiobutton := NewRadioButton(26,48, 'Continue with Existing');
radiobutton.Width :=200;
if Form.ShowModal <> mrOk Then
  Exit

Visual Basic Example:

Form = NewForm(230,150, "Sample Form")
NewLabel(26,23,"Name")
NewEdit(60,20, "New Area")
radiobutton = NewRadioButton(26,48, "New Area",1)
radiobuttion.width = 200
radiobutton = NewRadioButton(26,48, "Continue with Existing?",0);
radiobutton.Width =200
if Form.ShowModal <> mrOk Then
  Exit Function
end if


Enterprise and Developer editions

This article was:  
Prev  Not what you're looking for? Suggest a topic  Next
function NewButton(Left, Top, Caption, ButtonType = mrNone)     function NewCheckBox(Left, Top, Caption, Checked = false)