Lazarus

Programming => LCL => Topic started by: egsuh on December 12, 2020, 08:46:58 am

Title: Subgrouped Radiogroup?
Post by: egsuh on December 12, 2020, 08:46:58 am
Is there any way that I can subgroup ragiobuttons, all in a same group (with different values).
This is just for readibility. For example, I'd like to make to choose one of following items, but sub-group them so that it is easy to distinguish whether it is line, or curved figure or straight line figures.

    Line

    Circle
    Eclipse

    Triangle
    Rectangle
    Pentagon
Title: Re: Subgrouped Radiogroup?
Post by: wp on December 12, 2020, 11:00:00 am
Change the BorderSpacing of the individual buttons:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   RadioGroup2.Controls[0].BorderSpacing.Bottom := 8;
  4.   RadioGroup2.Controls[2].BorderSpacing.Bottom := 8;
  5. end;
  6.  

BTW, if you, like me, have the feeling that the radiobuttons are too close to the left border you can increase the distance by changing the ChildSizing.LeftRightSpacing property:
Code: Pascal  [Select][+][-]
  1.   RadioGroup2.ChildSizing.LeftRightSpacing := 12;  // default: 6
Title: Re: Subgrouped Radiogroup?
Post by: egsuh on December 13, 2020, 02:55:17 pm
@wp
 :)
TinyPortal © 2005-2018