?
Solved

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

Posted on 2003-11-25
8
Medium Priority
?
487 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Introduction to Processes
Suggested Courses

770 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