My strategy has been to create two almost identical dialogs and just swap them out in the exact same screen position each time the user changes the selection in the RadioGroup.
As ugly as it is.....Here is what I have.....
Code: Select all
vbstart
vbend
let>var1=
let>var2=
let>var3=
let>var4=
let>DataSource=Access
Dialog>DBDialog
Caption=Access Details
Width=366
Height=371
Top=CENTER
Left=CENTER
Max=0
Edit=msEdit1,16,112,185,%var1%
Edit=msEdit2,16,188,185,%var2%
RadioGroup=msDataSrc,Data Source,24,8,185,65,Access%CRLF%Excel,0
Label=Access Details,32,88,true
Label=Access File Details,24,144,true
Button=Close,24,272,75,25,2
EndDialog>DBDialog
Dialog>XLDialog
Caption=XL Details
Width=366
Height=371
Top=CENTER
Left=CENTER
Max=0
Edit=msEdit1,16,112,185,%var3%
Edit=msEdit2,16,168,185,%var4%
RadioGroup=msDataSrc,Data Source,24,8,185,65,Access%CRLF%Excel,1
Label=XL Details,24,80,true
Label=File Details,24,144,true
Button=Close,24,288,75,25,2
EndDialog>XLDialog
Label>Dialogs
// check to see which is the current default data source
// and display the corresponding dialog
if>DataSource=Access
// check to see if the other dialog is open,then close it
ifw>XL Details
clo>XL Details
endif>
//make sure the inputs for the dialog are reset
rda>DBDialog
show>DBDialog
label>ShowDB
gda>DBDialog,dbr
if>DBDialog.msDataSrc=Excel
let>DataSource=Excel
goto>Dialogs
endif>
if>dbr=2
goto>ProgramEnd
endif>
goto>ShowDB
endif>
if>DataSource=Excel
ifw>Access Details
clo>Access Details
endif>
rda>XLDialog
show>XLDialog
label>ShowXL
gda>XLDialog,xlr
if>XLDialog.msDataSrc=Access
let>DataSource=Access
rda>DBDialog
rda>XLDialog
goto>Dialogs
endif>
if>xlr=2
goto>ProgramEnd
endif>
goto>ShowXL
endif>
label>ProgramEnd