[Developers] Re: Selection with order
Kristofer Tingdahl
kristofer.tingdahl at dgb-group.com
Thu Nov 1 17:11:25 CET 2007
Dear Robin.
> I'm looking at being able to select multiple inputs and move (order) the
> selections in a list. (I didn't readily see an identical example. If there
> is one let me know.)
>
> I see that I can use the ismultiselect flag from of the uiIoObj class to
> allow more than one selection. If I want to move (order) the selections it
> looks like I need to create a uiListView object (populating it with the
> selected inputs) and then use the uiListView::moveItem method similar to
> uiodtreeitem. Does that sound about right?
>
That is very correct. I propose you have make a uiListView, place an
"Add", "Remove", "Up" and "Down" uiPushButtons next to it. When the user
press "Add", you pop up a uiIOObjSelDlg and lets the user select items
to be added. On "Remove" you remove them from the list. When "Up" and
"Down" are pressed, we you move them up and down as thought above. A
hint is that you can hook up to uiListView::selectionChanged to
enable/disable the "Up", "Down" & "Remove" buttons. You don't want "Up"
to be clickable if the top item is selected.
Good luck,
Kristofer
--
Dr. Kristofer Tingdahl
dGB Earth Sciences
1 Sugar Creek Center BLVD #935; Sugar Land, TX 77478; USA
+1 281 652 5318
More information about the Developers
mailing list