Option Group Label Issue

G

Guest

Hi all,

I have an appearance issue that I can't seem to solve. I have a number of
checkboxes, listboxes, combo boxes and one option group on a form.

If the user selects on particular option, the rest of the form is disabled.
The form is to allow the user to perfrom a search, but if the user is looking
for a particular item number, then the rest os disabled as there is no need
to further refine the search.

So I created code to disable/enable all the applicable controls on the form.
But for the combo/check/list boxes, I didn't like that the default label for
the control was also greyed out when it was disabled, so I deleted the
default label, and recreated it (same name/caption), but since it was no
longer connected to the control, it wasn't greyed out when the control was
disabled.

For all controls it seems to work, except for the option group. I want the
radio buttons (and labels) to be greyed out, but I wanted to label of the
group (frame) to not be greyed out, so I also deleted that label and created
a new one.

My problem is, when the option group is enabled, if I click on a radio
button, the frame seems to move in front of the label, so I can see the line
of the frame OVER the label.

Now I don't know if there's a way to move it to the front? I can't find any
property to do that. Or, if I need to remake the frame to get the label back
(and have it connected to the frame), is there a way to prevent the gerying
out if the option group (frame) is disabled.

Any help is appreciated.

Thanks,
Jay
 
P

Peter Danes

In Design View, bottom of the Format menu has Move to Front and Move to
Back. Will those do what you need?

--
Pete

This e-mail address is fake to keep spammers and their auto-harvesters out
of my hair. If you need to get in touch personally, I am 'pdanes' and I use
Yahoo mail. But please use the newsgroups whenever possible, so that all may
benefit from the exchange of ideas.
 
G

Guest

It works when the form is first loaded, but as soon as an option is selected,
the label returns to behind the frame.

Thanks for that though, I didn't think about using that 'Move to Front/Back'

Jay
 
P

Peter Danes

Hmm, it looks like Access insists on having the active control in front.
I've used the Move to Front/Back for combinations of invisible command
buttons and labels behind, but in that case I always want the labels to stay
behind, so it isn't an issue. Playing with it now I see the same results as
you describe for an option group border. Can you put the label completely
inside the option group? If not, can you cut it up into two labels and put
one label inside and one outside, but positioned so that the line goes
between letters and it looks like one label? If none of those are possible,
maybe the easiest thing to do is make the option group's frame invisible and
draw your own rectangle, then use Move to Back on that.
 
G

Guest

I like the rectangle solution. I think I'll have to go with that. I can't
seem to get the two labels to work properly.

Thanks for the idea though. Never would have thought of that.

Jay
 
P

Peter Danes

You're welcome. Glad it helped.

--
Pete

Jay said:
I like the rectangle solution. I think I'll have to go with that. I can't
seem to get the two labels to work properly.

Thanks for the idea though. Never would have thought of that.

Jay
 
P

Peter Danes

Karl, even when the background is transparent, the border line comes to the
front when something in the group is selected. If the label Jay was playing
with crosses the top or bottom border, whenever the group becomes active,
the label would have a line through it. If it crosses the left or right
border, it might be possible to position things so that the line runs
between two letters without tromping on them, maybe by having a space in the
text there.

With a non-transparent background, you could make the label in two parts,
one right next to the group and the other just inside the border, aligned so
that they looked like one. But I didn't think to ask Jay if his background
was transparent - if not, then whatever part of the label was under the
option group would disappear completely when the group received focus. The
one I experimented with I set to transparent, I assumed Jay's was as well,
but maybe not, and that might have been enough to solve his problem.

The technique of cutting the label into two parts could still be used with a
non-transparent background, but sometimes it's easier to turn off all such
graphic 'helpers' by making them transparent or invisible and create your
own.
 
G

Guest

For what it's worth, the option group background had been transparent.

I didn't think to change the option group background at all, but Peter's
solution worked great. I just created a rectangle around the option group
and set the border of the option group to none. Then i shrank the option
group size by one grid point on each side, so the option group sat inside the
rectangle.

That worked like charm. I might look into the background ideas though.

Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top