2

enter image description here

I have a TGridPanel that has 6 columns (as an example). In each column there is a TRadiobutton. All five TradioButtons from a group. In this way the five TRadioButtons work as expected, and at the same time only one of them can be checked. To add vertical separator between columns, before adding the TRadioButtons, I have added four TPanels (in real code TStackPanel) and then I have inserted to each TPanels one TRadioButton, and then configured the panels's BevelEdges appropriately, to show the vertical lines. But now, as expected, each TRadioButton act separately, as their parents has changed from one unique TGridPanel to 5 separate TPanels.

Help me to have both vertical separators (in TGridPanel), and also make the TRadioButtons to act as a group.

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Zonouzi
  • 81
  • 9
  • Hi, for a quick solution, I have added one column for each vertical separator, and inserted in it a TSplitter, and next, setting the column width to a value just enaugh to show that splitter. But still I'm looking to a better solution. – Zonouzi May 20 '21 at 04:05

1 Answers1

2

You can do the following for each vertical separator:

  1. Add a column to GridPanel.ColumnCollection with Properties SizeStyle=ssAbsolute and Value=5 (column width in pixels).

  2. Insert a TPanel into this new column with Properties Align=alClient, Row=0, RowSpan=2, Color=clBtnShadow and BevelOuter=bvNone.

Dharman
  • 30,962
  • 25
  • 85
  • 135
headfime
  • 66
  • 7