Property Indexes
Published 17 NOV 2013 at 12:44:03AM
One of the things you'll see more of in OpenInsight 10 is the use of property Indexes when using the Get_Property and Set_Property functions. In previous versions these have only been used with the EditTable CELLPOS property, but now you'll find them in other places too, like the Tab Control.
For example, if you simply wish to access a single tab you can use an index with the TEXT property like so:
tabIdx = 3 tabText = get_Property( myTab, "TEXT", tabIdx ) call set_Property_Only( myTab, "TEXT", "New Text", tabIdx )
Of course, if you don't specify an index you'll be working with a dynamic array containing all the tab texts just like before.
Depending on the property in question it may support one or two dimensions. If the latter then the property index argument for Get_Property and Set_Property is a simple @fm-delimited array like so:
<1> Column index <2> Row Index
The use of 2D properties has been considerably expanded for the EditTable to reduce the need to call methods like TEXT_BY_POS, or the need to set ACCESSPOS before using the BITMAP property and so on, but we'll cover those in more detail in a future post.
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).
Comments
At 16 OCT 2014 09:12PM B. Cameron wrote:
Hi Carl, My apologies in not replying sooner, I just read your comment today. Almost a year later! Guess I should log in more. Yes nested tab controls. I do it now in 8.x with a little program trickery. It would be nice to get rid of the tricks. :) Thanks!
At 19 NOV 2013 08:50PM bcam wrote:
Hey Carl - nice! Any thought to having tabs on tabs?
At 19 NOV 2013 08:52PM Captain C wrote:
Hi Bruce - Not sure what you mean by "tabs on tabs" You mean nesting tab controls?
Cheers
Carl
At 18 APR 2014 01:19AM Kevin Fournier wrote:
What are your thoughts on allowing set_property's index parameter to be used on OLE controls. Currently, we use Set_Property(TreeCtrl, "OLE.ItemText[Key]", Value). Sometimes it gets a bit annoying to concatenate variables. Set_Property(TreeCtrl, "OLE.TreeItem", Value, "Key") seems clean to me.
At 22 APR 2014 12:02PM Captain C wrote:
Hi Kevin, I think that's a good idea - I'll take a look at it.