Selection in GroupBox
Posted: Mon Mar 14, 2011 7:23 pm
I'm creating a groupbox at runtime and I assign two radiobuttons to it.
What happens is that I can't change the selection after the creation.
I'd like to know if there's any function I have to create to allow that selection. Exemple an OnClick event or something like that...
Regardless,
- Charles
Code: Select all
var
oGrpBox: TSRVGroupBox;
oRdb1: TSRVRadioButton;
oRdb2: TSRVRadioButton;
oRdb3: TSRVRadioButton;
begin
// Groupbox
//
oGrpBox := TSRVGroupBox.Create(nil);
oGrpBox.Parent := SRichViewEdit1.RichViewEdit;
oGrpBox.Name := 'SRVGroupBox';
oGrpBox.Caption := 'SRVGroupBox';
oGrpBox.Color := clWhite;
// Radiobutton 1
//
oRdb1 :=TSRVRadioButton.Create(nil);
oRdb1.Parent := oGrpBox;
oRdb1.Name := 'RadioButton1';
oRdb1.Font.Name := 'Microsoft Sans Serif';
oRdb1.Caption := 'RadioButton1';
oRdb1.Color := clWhite;
oRdb1.Left := oGrpBox.Left + 10;
oRdb1.Top := oGrpBox.Top + 20;
// Radiobutton 2
//
oRdb2 := TSRVRadioButton.Create(nil);
oRdb2.Parent := oGrpBox;
oRdb2.Name := 'RadioButton2';
oRdb2.Font.Name := 'Microsoft Sans Serif';
oRdb2.Caption := 'RadioButton2';
oRdb2.Color := clWhite;
oRdb2.Left := oGrpBox.Left + 10;
oRdb2.Top := oGrpBox.Top + 40;
SRichViewEdit1.RichViewEdit.InsertControl('GrpBox', oGrpBox, rvvaMiddle);
I'd like to know if there's any function I have to create to allow that selection. Exemple an OnClick event or something like that...
Regardless,
- Charles