Solved

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

Posted on 2003-11-25
8
480 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
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
 
LVL 100

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
java constructor error 8 87
oracle query help 18 78
Installed softare without GUID 6 54
Turning python script into an applet 12 42
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
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.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now