Recent

Author Topic: StringGrid CheckBox  (Read 4788 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: StringGrid CheckBox
« Reply #15 on: April 17, 2019, 03:26:26 pm »
@Handoko,

If I were to port my app to Linux
What would I need

Does linux use dll's (not a windows dlll though)

What?
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: StringGrid CheckBox
« Reply #16 on: April 17, 2019, 03:34:28 pm »
Linux can use dll too (in Linux, they are .so). It depends on how you write the program.

Porting to Linux is not too hard. If you ever have problem with it, post it on the forum. Or you if want, you can contact me directly.
« Last Edit: April 17, 2019, 03:44:48 pm by Handoko »

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: StringGrid CheckBox
« Reply #17 on: April 17, 2019, 03:35:34 pm »
Thanks for all your help
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

jesusr

  • Sr. Member
  • ****
  • Posts: 484
Re: StringGrid CheckBox
« Reply #18 on: May 12, 2019, 09:23:37 am »
This is my 1st trying StringGrid with the checkboxes.

1) See screenshot... Why are all my checkboxes "highlighted blue"
They need to be all Unchecked at prog startup


You probably added a custom column and selected cbsCheckboxColumn as the column's ButtonStyle.
The column's properties ValueChecked and ValueUnChecked define what values will make the checkbox checked or unchecked respectively
As initially the grid is empty and an empty value is not ValueChecked or ValueUnChecked the checkboxes are"grayed".

If you don't want to use code for setting the initial value of the cells, right click the grid and select "Edit StringGrid ....", then fill with 0's the cells of the checkbox column, press "OK" or "Apply" and you are done...

jamie

  • Hero Member
  • *****
  • Posts: 6128
Re: StringGrid CheckBox
« Reply #19 on: May 12, 2019, 02:47:52 pm »
I see the same issue.

I think it may have something to do with Themes..

Checkmarks in Menus for example have Blue backgrounds when checked on. They don't use the background color of the
parent.

 The only way I know currently to get around that is to use the OwnerDraw method so that you can customize the colors.
I'll look into it deeper since I am also suffering from the same effect that really does not look appealing here.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018