Dialog Label will not display in Tab/RadioGroup

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Dialog Label will not display in Tab/RadioGroup

Post by gtdalsanto » Mon Dec 17, 2007 11:42 pm

I am probably trying to make the Dialog Designer to do something it was not designed to do. But I have been able to do it in other VBA applications using the VB Forms in MS Access and was hoping this functionality would work here in the dialog designer also.

What I am trying to do is have a Dialog box that has multiple tabs on it. Each tab has multiple input boxes, labels, and radio groups. This all works fine. However, what I am trying to do is use the RadioGroup control as a wrapper around a group of objects, i.e. labels with edit boxes. The following combinations work:

Create a dialog box, with a radiogroup box with no items. Inside the radiogroup, I have labels/edit boxes. The radiogroup box is acting like a wrapper, with the title of the radio groupbox defining the items in the box. It would be code something like the following:
RadioGroup=msRadioGroup1,msRadioGroup1,88,72,225,121,,-1
Edit=msEdit1,160,104,121,msEdit1
Button=msButton1,152,216,75,25,0
Label=test1,112,104,true

Second, creating a Dialog with a TAB, with multiple pages, and on the first tab, just putting the label/edit box. This works. However, if you put a TAB, then add a radiogroup box, and inside the empty radiogroup box you try to put a label and an edit box. In this case, the label is always put behind the radiogroup when on a tab. I have tried putting the radiogroup "behind" the label, but it still does not display. Is there something I am doing wrong?

In the dialog code below, the item that will not display is MSLabel3 - Label=test3,48,64, which is located on Page2 of the Tab, and is behind/under the radiogroup box. Below is the dialog example that I am trying to make work.

Dialog>Dialog1
Caption=Dialog1
Width=774
Height=400
Top=104
Left=16
Max=1
Min=1
Close=1
Resize=1
RadioGroup=msRadioGroup1,msRadioGroup1,88,72,225,121,,-1
Edit=msEdit1,160,104,121,msEdit1
Button=msButton1,152,216,75,25,0
Label=test1,112,104,true
TabBook=msTabBook1,384,72,289,193,0
TabPage=Page1
Label=test2,16,32,true
Edit=msEdit2,56,32,121,msEdit2
TabPage=Page2
Label=test3,48,64
RadioGroup=msRadioGroup2,msRadioGroup2,32,24,185,105,,-1
Edit=msEdit3,96,64,81,msEdit3
Edit=msEdit4,72,136,121,msEdit4
Label=test4,40,144,true
EndTabBook
EndDialog>Dialog1

Show>Dialog1,Result

I am trying to use the radiogroup control as a wrapper around multiple objects. I use the RadioGroup Caption as the group name. It tends to make the dialog box GUI look more clean. Again, I realize the dialog designer is a basic interface, but it would be great if this would work.

Any help or insight on how to do this would be greatly appreciated.

Thanks.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Dec 18, 2007 4:51 am

I don't know how to make the labels show through the radiogroup but I would suggest using progress bars instead. They make nice separator lines when slimmed down to 1 pixel thick.

[code]
Dialog>Dialog1
Caption=Dialog1
Width=774
Height=400
Top=223
Left=167
Max=1
Min=1
Close=1
Resize=1
RadioGroup=msRadioGroup1,msRadioGroup1,88,72,225,121,,-1
Edit=msEdit1,160,104,121,msEdit1
Button=msButton1,152,216,75,25,0
Label=test1,112,104,true
TabBook=msTabBook1,384,72,289,193,0
TabPage=Page1
Label=test2,16,32,true
Edit=msEdit2,56,32,121,msEdit2
TabPage=Page2
Label=test3,48,64
Edit=msEdit3,96,64,81,msEdit3
Edit=msEdit4,88,96,121,msEdit4
Label=test4,40,96,true
ProgressBar=msProgressBar1,32,32,209,1,0
ProgressBar=msProgressBar2,32,136,209,1,0
ProgressBar=msProgressBar3,32,32,1,105,0
ProgressBar=msProgressBar4,238,32,1,105,0
EndTabBook
EndDialog>Dialog1

Show>Dialog1,Result
[/code]

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Wed Dec 19, 2007 3:38 am

Thanks for the workaround. Possibly this could be an enhancement down the road in the dialog designer to allow labels to be displayed in a radiogroup box.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Dec 19, 2007 3:57 am

gtdalsanto wrote:Thanks for the workaround. Possibly this could be an enhancement down the road in the dialog designer to allow labels to be displayed in a radiogroup box.
Ditto, thanks for sharing this workaround JRL, very useful.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Dec 19, 2007 3:04 pm

Thanks for the workaround.
You're welcome. But since I've been doing this since the progress bars first became available, I don't see it as a workaround, I see the progress bar used as a separator as a reasonable use of the progress bar. Using the radiogroup object is clever but will have very distinct limitations. One being you will always have the radiogroup label to contend with, another being you can only do a rectangle, another being since it is an object it can cover up other objects.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sat Apr 26, 2008 8:47 am

I'm sorry. I still can't see the purpose of ProgressBar being used here. When running JRL's script, I don't see the progress bar per se. Please help. Thanks.

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sat Apr 26, 2008 3:36 pm

armsys,

Run the sample. Pick the tab called "Page2". The box drawn around the labels and edit boxes under Page2 is made up of four progress bars. That's the potential usefulness of the progress bars, to be used as visual separators in a dialog.

Hope this helps,
Dick

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sat Apr 26, 2008 4:19 pm

Dick,
Thanks for revealing the secret. I was perplexed by the dark border. Of course, it's useful becuase the Dialog> doesn't support line drawing.
Appreciate your help.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts