I have 2 listboxes side by side where the user can move an item from left to
right or vice versa by double clicking the item or clicking on a button(s)
between the two listboxes. I want to enable to disable the move left or
move right buttons as determined by the number of items in the listbox.
Example. I have no items in the right hand list box so I don't want the
move left button to be enabled. As soon as an item is moved to the right
hand listbox then I would like the return button to be enabled. As the
MoveListItem can be called in several ways, I am trying to think of a clean
way to enable or disable without duplicating the code.
What is the best way to do this?
Bill
Michael C - 07 Feb 2007 06:16 GMT
>I have 2 listboxes side by side where the user can move an item from left
>to right or vice versa by double clicking the item or clicking on a
[quoted text clipped - 9 lines]
>
> What is the best way to do this?
Put the code in a function and call it from whereever is required.
> Bill
RobinS - 07 Feb 2007 07:00 GMT
Put it in the click event when you move from one listbox to the other.
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
-----------------------------------------------
>I have 2 listboxes side by side where the user can move an item from left
>to right or vice versa by double clicking the item or clicking on a
[quoted text clipped - 11 lines]
>
> Bill