Discussion:
Problems with option button control arrays
(too old to reply)
budgie
2006-05-03 09:32:05 UTC
Permalink
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.

So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.

The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.

The layout is:

Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc

I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.

Am I destined to only get the result I require by individually framing each Q&A?
Bob O`Bob
2006-05-03 18:19:02 UTC
Permalink
Post by budgie
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.
So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.
The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.
Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc
I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.
Am I destined to only get the result I require by individually framing each Q&A?
Yes.

Option buttons are mutually exclusive with all other option buttons
**within the same container**

That is the ONLY way it works.

It has /absolutely nothing/ to do with control arrays.



Bob
--
budgie
2006-05-04 00:21:28 UTC
Permalink
Post by Bob O`Bob
Post by budgie
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.
So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.
The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.
Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc
I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.
Am I destined to only get the result I require by individually framing each Q&A?
Yes.
Option buttons are mutually exclusive with all other option buttons
**within the same container**
Aaahhh! And I guess that, in the absence of an "explicit" container, the form
is the container.
Post by Bob O`Bob
That is the ONLY way it works.
It has /absolutely nothing/ to do with control arrays.
Thanks for that very succinct explanation. Back to individual containers it is
then :-(
budgie
2006-05-04 04:23:17 UTC
Permalink
Post by budgie
Post by Bob O`Bob
Post by budgie
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.
So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.
The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.
Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc
I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.
Am I destined to only get the result I require by individually framing each Q&A?
Yes.
Option buttons are mutually exclusive with all other option buttons
**within the same container**
Aaahhh! And I guess that, in the absence of an "explicit" container, the form
is the container.
Post by Bob O`Bob
That is the ONLY way it works.
It has /absolutely nothing/ to do with control arrays.
Thanks for that very succinct explanation. Back to individual containers it is
then :-(
Follow-up ....

Using individual frames, I am now forced into two pages to solicit responses
from the user. (I probably would have anyway without frames, but now it's
certain). This form(pair) is reached via an OptionButton menu on an earlier
form. ratehr thanexpand that menu further for the second page, I have a command
button on each page "Next Page" or "Previous Page" as the case may be.

When I toggle back and forth about eight times between the forms (in the IDE) I
get a stack overflow. I was doing a Hide and Show between the forms, and
attributed the problem initially to the stack storing "returns". Changing the
Hide to Unload didn't change things.

Is this going to be a problem that will force me to not allow toggling between
these two pages of selections?

Tnx again for any advice.
John Kane
2006-05-04 15:14:43 UTC
Permalink
In article <***@4ax.com>, ***@privacy.net
says...
Post by budgie
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.
So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.
The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.
Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc
I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.
Am I destined to only get the result I require by individually framing each Q&A?
You could use Picture Boxes as the containers, and make the BorderStyle
0-None. This won't take up any more screen space than the labels and
option buttons.
--
Regards, John
***@johnkane.clara.co.uk
budgie
2006-05-05 01:02:11 UTC
Permalink
Post by John Kane
says...
Post by budgie
I have used control arrays of option buttons without problems to date, but
always placed within their own frame. Right now I have a series of Yes/No
questions and I had it all working fine in separate frames, but that commits
four screen lines per Q&A. The best use of space on the form seemed to be
questions as labels with a pair of option buttons on the same line for the Y/N
user selection.
So I set up the questions as labels in a frame. I then assigned pairs of option
buttons as control arrays. But VBDOS is treating ALL these OB's as part of one
super-control-array.
The setup is correct. Each pair has the same control name, and indexes 0 and 1
assigned by VBDOS as it asks(for each pair) if I want to set up a control array.
Q1? Option1-Index0 Option1-Index1
Q2? Option2-Index0 Option2-Index1
Q3? Option3-Index0 Option3-Index1
etc
I also repeated this exercise without a frame, in case that was causing to VBDOS
to see it all as one big array. Same outcome.
Am I destined to only get the result I require by individually framing each Q&A?
You could use Picture Boxes as the containers, and make the BorderStyle
0-None. This won't take up any more screen space than the labels and
option buttons.
Dang! I've just restructured everything on those forms to take frames!

I just tried that suggestion and it works (I'm sure you knew that), so I may
revisit those forms. Many thanks. I'm learning a lot from the helpful gurus
here.

Continue reading on narkive:
Loading...