Recent

Author Topic: [SOLVED]TStringGrid buttons  (Read 521 times)

jcmontherock

  • Sr. Member
  • ****
  • Posts: 316
[SOLVED]TStringGrid buttons
« on: October 14, 2025, 11:54:58 am »
I wanted to use my own buttons in TStringGrid with edit cells option. With example in Lazarus and some searches in Internet, I could do it. In fact it works sometimes and sometimes not: Both buttons are mixed, the original and my own button. I join the source code of a test. How could I avoid the mixing of the buttons which appears sometime ? It seems that when the aplicacation is build it will work. For ex: I delete the exe file and recompile, then it's OK. When I reexecute the exe file then buttons are mixed together.

Editing:
If I reexecute the exe file (out of Lazarus) it's work fine
« Last Edit: October 14, 2025, 05:25:48 pm by jcmontherock »
Windows 11 UTF8-64 - Lazarus 4.2-64 - FPC 3.2.2

wp

  • Hero Member
  • *****
  • Posts: 13228
Re: TStringGrid buttons
« Reply #1 on: October 14, 2025, 12:14:40 pm »
What do you mean with "mixed together"? Seeing the button with the arrow (yours) and seeing the button with ellipsis (...)? I am always seeing the buttons with the arrow.

jcmontherock

  • Sr. Member
  • ****
  • Posts: 316
Re: TStringGrid buttons
« Reply #2 on: October 14, 2025, 04:08:40 pm »
See the image joined. It probably comes from the EDI. So, it is solved.
« Last Edit: October 14, 2025, 05:25:02 pm by jcmontherock »
Windows 11 UTF8-64 - Lazarus 4.2-64 - FPC 3.2.2

wp

  • Hero Member
  • *****
  • Posts: 13228
Re: [SOLVED]TStringGrid buttons
« Reply #3 on: October 14, 2025, 05:49:39 pm »
You mean the dotted rectangle in the button? Could be the grid's focus rect. What happens when you turn off the grid's FocusRectVisible property?

jcmontherock

  • Sr. Member
  • ****
  • Posts: 316
Re: [SOLVED]TStringGrid buttons
« Reply #4 on: October 16, 2025, 04:19:29 pm »
The image should be:
Windows 11 UTF8-64 - Lazarus 4.2-64 - FPC 3.2.2

 

TinyPortal © 2005-2018