Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-select Listbox - Color Issues
Message
From
13/09/2002 02:27:08
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00698158
Message ID:
00700050
Views:
20
Hi Vlad,

Thanx a lot for that offer. It surely'll make it very easy for me. Yes, the more it is like Windows Explorer, the better it is. Just one thing I wanted to add. The listbox may have disabled items ( by prefixing them with "\" ) and if the user clicks or moves up/down on the disabled items, then the previous / next item must get selected, depending on the key pressed.

This is not very urgent, so do it if and only when you have spare time.
Thanx a lot once again.
Hitendra

>Hi!
>
>Well, you can simulate Windows Explorer functionality by using code. You can manipulate selected items and current items by using List Box properties and methods. I can try to make a simple sample for you if needed. The key problem in here is determining if Shift and Ctrl buttons are pressed. If they're not pressed, any change (InteractiveChange event) should clear all selection and select current item only (like in Windows Explorer).
>
>Would it be better for you to have it work the same as in Windows Explorer?
>
>>Hi Vlad,
>>
>>Thanx a lot for the "popup as a source" idea. I'll see if it's feasible to use. There's a difference between Explorer interface and the multi-select listbox interface. When you click on an item in Explorer, it gets selected but gets deselected when you move up or down. In multi-select Listbox, the item clicked becomes selected and you've to unselect it explicitly before traversing the list. If there are no items selected in Explorer, the current item is shown in Blue color, while it is always shown with dotted rectangles in multi-select Listbox. This type of differences are sometimes unacceptable and unexplainable to clients, though we as developers recognize and are ready to work with VFP constraints.
>>
>>Thanx anyway,
>>Hitendra
>>
>>
>>>Hi!
>>>
>>>I did not ever thought it could be a big training issue, because almost everywhere in Windows it is used in the same role. For example, look to the Windows Explorer for files - multi-selection is implemented there by the same way. Anyway, if you think so...
>>>
>>>You can control items cooring in list box by using a popup as a source for list box. However, it causes a cople of limitations:
>>>- you will have no scroll bar and will have arrows instead for scrolling similar to what you have with very long menu
>>>- You will have no mover bar feature if it is needed
>>>- multi-select is possible with certain tricks
>>>
>>>With popup you can control colors of disabled, selected and current item. I do not know for sure, but seems this even will not require programming - just correct defining of colors in DEFINE BAR ... COLOR RGB(R,G,B,R,G,B), ... command. There are 10 pairs of colors you can define for different states of the list item.
>>>
>>>>Hi Vlad,
>>>>
>>>>Yes, I did see the dotted rectangle for the Active item. But for an end-user, who worked with single-select listbox earlier, working with multi-select listbox without any proper indication of active item, may become a difficult training issue. Actually this is a moverlist application and grids implementation will be highly difficult. BTW, how did you do this color management for your application ie which property or algorithm you used?
>>>>
>>>>Thanx anyways.
>>>>Hitendra
>>>>
>>>>>Hi!
>>>>>
>>>>>Active item is in the dotted rectangle. Did you see it?
>>>>>
>>>>>You can organize colored highlighting of active item, but this would be hard, have a lot of limitations and coding etc. I think this is not needed. We did this in one application and performance is terrible.
>>>>>
>>>>>You can also use grid instead of list box that gives much more power and functionality. This is another level of programming though (more complex) and also require programming, but you get much more features and possibilities.
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>In a single-select Listbox, by default, the Active or the current Item appears with a blue background. But in a multi-select Listbox, the Active Item doesn't appear in a different color and is difficult to identify. Is there any property setting or piece of code, by which the Active item appears in a different color? Also this color must be different from the Selected color otherwise the user won't be able to differentiate between an Active Item and a Selected Item.
>>>>>>
>>>>>>Thanx, in advance.
>>>>>>Hitendra
Previous
Reply
Map
View

Click here to load this message in the networking platform