Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comboboxes internals
Message
From
24/08/2005 11:32:55
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01043044
Message ID:
01043400
Views:
15
>>>I changed your number 7 to 6 and it almost worked. However, our QA found one case where it didn't work, e.g. the drop-down shown in smalled width than the combo's width.
>>
>>7 is not a magic number, it is the default popup items height when DisplayCount=0
>>
>>The issue is you 39 value!
>>
>>Stay in bell, I am nearby ...
>
>Ok. BTW, the funny thing is that one of our QA doesn't like it at all. She called these combos "retarted" < g > E.g. all our efforts are spent in vain, for nothing. Anyway, we still have to fix that code, even if I'm not going to use it in the end product...

Naomi, I consider few who criticizes a thing after having seen it,
because who doesn't have the ability to foresee the result
it cannot have the ability to judge it.
It can clearly have the power to do it, but this is another thing....

Returning to the matter.
It needs to establish of the rules and of the priorities
Priority: substance:
The popup has to show all the information.
Then you cannot cut the text
width=MAX(defaultpopup.width,combo.width)  
Rule: Aesthetics:
it is as in to dress:
two very different colors can be very well together,
but two almost equal they often make disgust.
Then,
if defaultpopup.width a little smaller is of combo.width,
then it is worthwhile to apply the rule 1.
otherwise it is worthwhile to leave it as VFP builds it.

Result:
#define DRESSPOPUPMARGIN 10
width=IIF(BETWEEN(combo.width-defaultpopup.width,1,DRESSPOPUPMARGIN),defaultpopup.width)
The funny one is as to do it!
How to discover defaultpopup.width?
If VFP were a true OOP, it would return a contained object in the combo that checks the popup, but it is not this way.
Then, to do it, we needs to capture the window of the popup with BINDEVENT,
and to resize it with a few of APIs calls, withou fire some C0005!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform