04-28-2007 07:24 PM
04-30-2007 10:26 AM
04-30-2007 10:48 AM
04-30-2007 10:55 AM
That's a good point. Does your tree have a horizontal scrollbar? If not, then you could use the NumCols property of the tree to get the number of visible columns of the tree control, and that could be your upper limit on checking the cell strings of each column. If it does have a horizontal scrollbar, however, I'm not really sure if there is a way to do what you want, other than to have a "max # of empty strings" threshold that, if you pass, you assume there aren't any more column strings. But I'm guessing your tree already has a max number of columns, right?
-D
04-30-2007 11:37 AM
NumCols property is indeed what I am using now, but I was trying to make a more generic routine that reads the text from the invisible columns as well for an arbitrary tree control.
I think it makes sense for NI to add another property, the column index of the last cell with text.
Fedor.
04-30-2007 11:42 AM - edited 04-30-2007 11:42 AM
Message Edited by Fedor on 04-30-2007 11:43 AM
04-30-2007 11:49 AM
Depending on what properties you're trying to read/write after setting the Active Column to "-2", you may get an error...for example, if you try to read the "Cell String" after setting the active column to -2, you'll get an error, since the Cell String is only a single string. However, you get no error if you set the active column to -2, then set the cell font to "Bold"...in this case, all the columns of the active Tag row become bold.
I will file a product suggestion against the tree control that there be some easy way to determine the last column in a tree containing cell text.
-D