Recent

Author Topic: problem with radio buttons!  (Read 3583 times)

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: problem with radio buttons!
« Reply #15 on: December 04, 2020, 10:34:19 am »
If you don't want the TRadioGroup border and caption you can also get an automatic two-column layout in a panel by using the ChildSizing property. In fact, that's the way how TRadioGroup does the layout internally. Just set ChildSizing.Layout to cclLeftToRightThenTopToBottom and  .ControlsPerLine to 2. The distance between the columns is determined by .HorizontalSpace, left/right margin to the container border by .LeftRightSpacing. Additional control to positioning is given by Enlarge|ShrinkHorizontal|Vertical (too lazy to describe...). Important: the radiobuttons must not be aligned (Align = alNone), the can only have their standard anchors ([akLeft, akTop]). The order of the radiobuttons is determined by the order in which they were added; later rearrangement is possible by calling the "Z Order" context menu. If you finally set the AutoSize of the parent to true you have a very robust layout of the radiobuttons so that they will never overlap.

speter

  • Sr. Member
  • ****
  • Posts: 349
Re: problem with radio buttons!
« Reply #16 on: December 06, 2020, 05:24:00 am »
If you don't want the TRadioGroup border and caption you can also get an automatic two-column layout in a panel
Thanks, but I am really liking the way the TRadioGroup simplifies my radio buttons (& checkboxes). Prior to the comments in this thread I had used Panels instead.

The program I am working on had 21 radio buttons and 47 checkboxes; and now has 3 groups (each with 21 items) and 5 checkboxes; which is a huge improvement! :)

cheers
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: problem with radio buttons!
« Reply #17 on: December 06, 2020, 02:58:10 pm »
I wouldn't want to be the person that has to read all of those check boxes and radio buttons...

I envision a change in strategy soon  :o
The only true wisdom is knowing you know nothing

speter

  • Sr. Member
  • ****
  • Posts: 349
Re: problem with radio buttons!
« Reply #18 on: December 06, 2020, 11:35:59 pm »
I wouldn't want to be the person that has to read all of those check boxes and radio buttons...

I envision a change in strategy soon  :o
They are in 4 tabs and the 3 x 21 all have the same captions; so it is not as bad as it sounds.
It allows me to change the (sudoku solving techniques) being used. :)

cheers
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: problem with radio buttons!
« Reply #19 on: December 06, 2020, 11:43:53 pm »
Hi!

I think if you want to code some Sudoko stuff you should use a TStringGrid.
In the FixedRows and the FixedCold you can write your caption stuff.

And in the other fields you can let the computer play Sudoku.

Winni


 

TinyPortal © 2005-2018