Recent

Author Topic: TIpropertyGrid and setting limits on common property types  (Read 276 times)

jamie

  • Hero Member
  • *****
  • Posts: 7405
TIpropertyGrid and setting limits on common property types
« on: November 18, 2025, 01:27:29 am »
I am using the TIPropertyGrid to make a streaming designer for a simple template editor and for simple standard types
of Properties like Integers, Int64 etc, editors already are registered however, I would like to be able to set things like read only for some and or limit range of values being entered by the user.

 So far all I can see to do this is to override or subclass existing editors and register that using the simple Property name so I can basically answer the call to the LIMIT range and things like READ only.

 Do I really need to create Property editors just to control Limits and Read only values after streaming in the values on already made Property Editors?

 I was looking at the Hook code, and I am not sure if that is where I need to go to control existing property editors in specific fields.

 Some insight could help, I guess.

Jamie


The only true wisdom is knowing you know nothing

BildatBoffin

  • New Member
  • *
  • Posts: 41
Re: TIpropertyGrid and setting limits on common property types
« Reply #1 on: November 18, 2025, 07:41:37 pm »
No. For the limits you can simply clamp inside a setter. To make things read only just define a published getter and no setter.
« Last Edit: November 18, 2025, 08:28:33 pm by BildatBoffin »

jamie

  • Hero Member
  • *****
  • Posts: 7405
Re: TIpropertyGrid and setting limits on common property types
« Reply #2 on: November 18, 2025, 11:25:01 pm »
Yes, I can do that, that's not an issue... Thanks.


One more question while I am thinking about it.

I put an Enumerator property in the Object I am using and the TIPropertyGrid did not list it in the order that I created it in.

 I didn't really look closely but it could have sorted it or maybe the compiler moves things around but if you have an Enumerator for example

 (One, Two, Three....);

 It does not show in that order in the drop down.

I can supply an example if needed.

Jamie.

The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018