How to let listbox's cell be editable?

Status
Not open for further replies.

foo

Usenet Archive
Joined
Sep 9, 2001
Messages
144
Reaction score
0
Hi, Everyone

I want to design a MDL program which have a listbox that cells can be editable. In MicroStation's advanced program, such as Plant Piping Desgin System, it is true. I wonder how to implement it?

Any help are appreciated.

Foo.
 
foo ...

I want to design a MDL program which have a listbox that cells can be editable. In MicroStation's advanced program, such as Plant Piping Desgin System, it is true. I wonder how to implement it?

As you probably know, an MDL ListBox is a display-only item. Therefore, an editable cell has to be implemented separately, using a text item.

You need a text item that is normally invisible. Your ListBox hook function needs an event handler that catches your user's edit command. The hook function can extract the cell location (XY position in the displayed ListBox) and its dimension (BSIRectangle). Now resize your text item and make it visible.

In the text item's hook function, trap the FOCUSOUT event to make the item invisible once more, transfer its value to the StringList (or ListModel in V8), and refresh the ListBox to display the modified value.
 
In MicroStation V8 this is now possible it is an attribute you can add to the listbox item if you use a ListModel as the underlying data structure.

Regards,
mark anderson

"foo" wrote:

Hi, Everyone

I want to design a MDL program which have a listbox that cells can be editable. In MicroStation's advanced program, such as Plant Piping Desgin System, it is true. I wonder how to implement it?

Any help are appreciated.

Foo.
 
Status
Not open for further replies.

Latest threads

Back
Top