Solved

How do VB6 decide which optionbuttons that are in family and which are not?

Posted on 2003-11-25
8
486 Views
Last Modified: 2010-04-17
My problem is that I have different groups of optionbuttons. In each group only one option can be selected (at least - that's the goal here).
Let me figurate a scenario:

I have 3 groups of 4-6 optionbuttons, respectivly called "Source", "Orientation" and "Scaling"
Each group is an control array.
"Source" is working great (only one selected at every time, and the option doesn't disapear when selected an option in any of the other two groups.
"Orientation" and "Scaling" is where the problem starts.

When I press the 1st option in "Orientation" the 2rd option from "Scaling" disapear, and when selected the 2nd from "Orientation"
the 3rd one in "Scaling" disapar (that is - the selection mark (if it is selected)).

My conclusion is that these buttons are somehow in family or bounded, but each group (and also each control array) is in three different
containers (Frames named fraSource, fraOrientation and fraScaling)

I've tried "everything" from not using control arrays to using picture boxes, still same behavor.

Anyone that can point me in a direction of a solution will have my eternal respect.
Regards,
John
0
Comment
Question by:jonrodde
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9823134
AFAIK, each group of option buttons sould belong to it's frame. All option buttons which don't belong to any frame belong to one group.
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 50 total points
ID: 9824142
show the code that you have wriiten, and then maybe we can point out where the error is.

AW
0
 

Expert Comment

by:kingbailey2000
ID: 9824542
This may sound obvious but remember the frames must go onto a form before the option buttons
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 101

Expert Comment

by:mlmcc
ID: 9824838
Also you can't move an existing option button into a frame it must be created in the frame.

mlmcc
0
 
LVL 2

Author Comment

by:jonrodde
ID: 9825835
Arthur_Wood; you've got a point there... I thought that it had something to do with the bounding thing... but no.
It was my code.. too much copy/paste is really dangerous.

Case 2:
            If optScaling(Index).Value = True Then
                SetScaling (ANAMORPHIC)
                AddText Now & " --- Scaling: Changed to 'Anamorphic'", frmMain.txtDebug
                For i = 0 To 1
                    optOrientation(i).Value = False
                Next i
                optScaling(3).Value = False
                optScaling(4).Value = False
            End If

The optOrientation had nothing to do in there... it was just forgotten from the copy/paste.
Now who deserves the point? Arthur_Wood?

-John
0
 
LVL 3

Expert Comment

by:wonkotsane
ID: 9845488
The way vb decides which option buttons belong to which group depends on what container the option button is in.  The form is a container and so is a frame.  You don't even have to have the frame visible, just a hidden frame will do to define groups of option buttons.
0
 

Expert Comment

by:AbhijitCPatil
ID: 9849526
hi

use different frames for different groups
like
if you have three options for 1 st group
insert a frame and then insert 3 option buttons in it
like this you can solve ur prpblem

0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 9852093
you CANNOT simply pick up a Radiobutton that is already on the form and drag-and-drop it into the frame.  The radiobutton is STILL drawn on the form(which remains it container), not the frame.  You MUST create the radio-buttion in the FRAME to begin with, so the FRAME is the container of the RadioButton, and the Form is Container of the Frame.

AW
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question