Recent

Author Topic: twstringgrid properties  (Read 2305 times)

arirod

  • New Member
  • *
  • Posts: 28
twstringgrid properties
« on: February 28, 2023, 02:38:49 am »
hello friends!
an observation: TStringGrid class does not have the "published" Handle Class and Handle Id properties, important to improve the HTML presentation (CSS). I am, at the moment, inserting the properties when creating the form. suggestions?

PierceNg

  • Sr. Member
  • ****
  • Posts: 383
    • SamadhiWeb
Re: twstringgrid properties
« Reply #1 on: March 04, 2023, 04:32:16 am »
If the desired fields exist in a superclass, then the expedient approach is to subclass TStringGrid and publish those properties in your subclass.

Thaddy

  • Hero Member
  • *****
  • Posts: 15555
  • Censorship about opinions does not belong here.
Re: twstringgrid properties
« Reply #2 on: March 04, 2023, 08:07:32 am »
That is indeed the recommended way if you really want them published.
If the properties are public you can access them anyway from code.
If the properties are protected you can also write a type helper to make them public.(not published)
« Last Edit: March 04, 2023, 08:26:17 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018