Recent

Author Topic: StringGrid with RadioButton column?  (Read 833 times)

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 631
    • Double Dummy Solver - free download
StringGrid with RadioButton column?
« on: August 05, 2025, 05:34:54 pm »
Is this possible? Seems like I need to roll my own here but I'm not sure where to start. Can anyone nudge me in the right direction? Thanks.
« Last Edit: August 05, 2025, 10:21:24 pm by bobonwhidbey »
Lazarus 4.6 FPC 3.2.2 x86_64-win64-win32/win64

Fred vS

  • Hero Member
  • *****
  • Posts: 3937
    • StrumPract is the musicians best friend
Re: Stringlist with RadioButton column?
« Reply #1 on: August 05, 2025, 07:38:00 pm »
Is this possible? Seems like I need to roll my own here but I'm not sure where to start. Can anyone nudge me in the right direction? Thanks.

MSEide-MSEgui does it.
(But for LCL I dont know  :-[).
« Last Edit: August 05, 2025, 07:47:35 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Awkward

  • Full Member
  • ***
  • Posts: 154
Re: Stringlist with RadioButton column?
« Reply #2 on: August 05, 2025, 07:48:05 pm »
Is this possible? Seems like I need to roll my own here but I'm not sure where to start. Can anyone nudge me in the right direction? Thanks.
Maybe you mean StringGrid? Coz StringList is just string list in memory.
TStringGrid can have column with checkboxes, value 0 and 1 (check column types). If you want radio button emulation, you will need just trace this column changing and set values of another lines

wp

  • Hero Member
  • *****
  • Posts: 13546
Re: Stringlist with RadioButton column?
« Reply #3 on: August 05, 2025, 08:16:47 pm »
Additionally you may be want to replace the checkbox icon by a radiobutton icon. There are two events in which you can do this: OnUserCheckboxBitmap (which passes a bitmap) and OnUserCheckboImage (which passes an ImageList and the ImageIndex).

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 631
    • Double Dummy Solver - free download
Re: Stringlist with RadioButton column?
« Reply #4 on: August 05, 2025, 10:21:01 pm »
Yes - I meant stringggrid :-o

I'll try replacing the checkbox icon. Seems like a good solution.
Lazarus 4.6 FPC 3.2.2 x86_64-win64-win32/win64

 

TinyPortal © 2005-2018