Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non-standard combobox
Message
De
15/09/2009 17:37:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01424555
Message ID:
01424643
Vues:
49
>>>No, Combobox doesn't have it, only ListBox has.
>>
>>Indeed; now I see it. I was checking the help file for ComboBox, and it included the MultiSelect property - must be the same text for both ListBox and ComboBox.
>>
>>>BTW, what would be a good name for such a listbox class?
>>
>>Something that reflects its function. Since it is supposed to imitate a ComboBox, perhaps ComboMulti or ComboMultiSelect; or, since it is a collapsable ListBox, CollapseListBox, CollapsableListBox, etc.
>
>I coded this class, but I'm thinking I should have used container based class instead of the ListBox as a bare. I don't like some of its current effects :(
>
>In particular, I don't like the gray area at the right side of the listbox. May be I should try adding a button with an arrow at the right side in run-time and only expand it when I click this button.
>
>UPDATE. Yes, I added this - now it looks like a combobox, but it is actually a listbox. Quite a nice class - I may publish it later in my blog.

In theory, it is appropriate to code such classes in a way that hides the internal details (encapsulation); e.g., never access Container.ListBox.... directly, but rather use methods at the container level. If you do this correctly, you can change from a class with container to one without, or change a ComboBox to a ListBox, and you only have to change the single class - not several places where you have used that class.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform