BitsLover Posted August 18, 2007 Report Share Posted August 18, 2007 Hi. I am learning to work with listboxes, but now I got stuck. I use a straight away ListBox and expected to use properties like "Active Cell" and "Edit Position" in an intuitive way, but it's not like that. Until now neither I did find enough about this in the LV help nor on the internet to understand it completely. Assume the ListBox is populated with data. A row is considered to be a record (fields to be handled as one). I can insert, delete, move up and down rows. When I click twice on a cell of the ListBox, I can edit it as expected. After editing, the left cell of the row is blue or contains a small dashed square (typical for the basic ListBox). When I move a row up and down, the blue cell/dashed square lives it's own life. I would like to get control over it. Perhaps someone could say something about the following: It seems obvious, but what exactly do the blue cell and small dashed square mean? Is the blue cell related to any of the properties/methods of a ListBox so I can read or write it? How to control which cell is blue/dashed-square/off? Dirk Quote Link to comment
Jan Florjanczyk Posted August 18, 2007 Report Share Posted August 18, 2007 QUOTE(BitsLover @ Aug 17 2007, 08:49 AM) It seems obvious, but what exactly do the blue cell and small dashed square mean?Is the blue cell related to any of the properties/methods of a ListBox so I can read or write it? How to control which cell is blue/dashed-square/off? Hi Dirk, Listboxes act in a similar way to enumerations, their value is a number which specifies which entry is selected (blue/dashed-square). If you write a number value to a listbox indicator, the cell corresponding to that number will be selected. If you read the number value from a listbox control, the index of the selected cell will be returned. In order to programmatically edit the entries of a listbox you may want to use a property node with the "Strings[]" value. What exactly do you mean that the selected cell takes a life of its own? Can you post an example of the way your control is setup? Hope that helps, Jan Quote Link to comment
JDave Posted August 18, 2007 Report Share Posted August 18, 2007 QUOTE(BitsLover @ Aug 17 2007, 05:49 AM) Perhaps someone could say something about the following:It seems obvious, but what exactly do the blue cell and small dashed square mean? Is the blue cell related to any of the properties/methods of a ListBox so I can read or write it? How to control which cell is blue/dashed-square/off? The blue cell indicates current cell selection, or the value of the listbox as indicated in the previous post. This updates with mouse clicks, keyboard events (up and down arrows), or programmatic selection. The dashed square indicates the cell that was last clicked on. I seem to remember that you can get rid of it by removing focus from the control. I will try to verify how I did that. The pertinent code is not readily available at the moment. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.