Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control of three options
Message
 
 
To
06/07/2011 10:53:18
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01517424
Message ID:
01517431
Views:
56
First, thank you for your suggestions. I get it that I need to create a container control with three option buttons. This is fine.

But I don't understand why there are 8 possibilities. How do you get the value of 7?

>(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
>
>_
>
>>Hi,
>>
>>I need to create a control that will have 3 choices kind of similar to how the option group control works but use should be able to select more than 1 choice. For example:
>>
>>Shift 1 [ ] Shift 2 [ ] Shift 3 [ ]
>>
>>The control should be bound to one field, of Int type. So that the value stored in the field would be as following:
>>0 - if user didn't make any selection
>>1 - If user selected Shift 1
>>2 - Shift2
>>3 - Shift1 + Shift2
>>4 - Shift1 + Shift3
>>5 - Shift2 + Shift3
>>6 - Shift1 + Shift2 + Shift3
>>
>>The only way I can think of is by creating a container-based class with three optio control buttons.
>>
>>But, in case I am missing something, is there a way to use one native VFP control for this?
>>
>>TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform