A few years back I wrote a Property Inspector control… that worked quite well, and was used by a number of other developers from this forum…
However it did have a few rough edges, wasn’t Retina/HDPI compatible, and to be honest was a bit dated in the way it looked…
I have recently decided to revamp another large project that I had also started a while back, as a matter of fact THAT project was the reason I designed the original PropInsp, and also why I decided to create a brand new from the ground up version.
CPI, the “Custom Property Inspector” control is 100% Retina/HDPI compatible, written in Xojo2016r4.3, and uses no platform specific declares.
it supports the following Property Types
- Boolean (as “switches” instead of “checkbox”
- Color
- Date (and/or) Time
- Double (the original also had Single, but I didn’t see the need)
- Path (folderitem of ANY filetype)
- Image (folderItem of only PNG or JPG filetypes)
- Integer
- String (as in TextField)
- Text (as in TextArea)
- Dropdown List (values are handled as Strings)
- “Special”… this will fire an event to allow the developer to manage any other type of data they need
It supports Expand/Collapse Sections (the old version did not)
It uses a in-memory SQLite database instead of custom classes and arrays
Set up is super simple
- AddSection() // sections must be unique name
- AddProperty( , ) // property “type” is based on the datatype of
- AddProperty( , , paramarray of Strings) // add a dropdown list type
Control Methods
- put( , , ) // update a single property
- get( , , byref ) // retrieve a single property
- CollapseAll and ExpandAll
- readonly( , , True | False) // a padlock will be display next to readonly properties
Any comments on features I did not mention, visual aspects etc…??
I still have more work to do with Put/Get , and so far I only have about 10 hours into this…