Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control of three options
Message
From
07/07/2011 11:32:22
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01517424
Message ID:
01517591
Views:
47
>>(1) I think there are 8 possibilities - from 0 to 7
>>shift1 = 2 ^0
>>shift2 = 2^1
>>shift3 = 2^ 2
>>
>>
>>(2) I'm afraid you'll have to use a container with 3 option buttons
>>
>>(3) Add an unvisible spinner to the container (range 0-7) and set the controlSource of the spinner to the field
>>
>>(4) add code to the container
>> - refresh = setting the options on/off (easy with bittest(field, 0) , bittest(field, 1) , bittest(field, 2)
>>
>>(5) add code to the optionbuttons (interactive change) to set the value of the spinner accordingly
>>
>>_
>
>Your suggestion works like a charm. What amazes me is that you came up with the whole thing (design, bit operations, etc.) in less than 10 minutes. You are very smart. Thank you.


You're welcome - and I have always liked bit operations (and, or, xor, not)

BTW, this technique is very common - look for example at the MessageBox() parameters
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform