I don't think there is really any way to have a variable number of
checkboxes in a dialog. Instead of making the checkboxes the variable why
not make the variable number be contained in a list box. In the example you
suggested below:
Have a listbox or popupmenu holding the list of open layers.
Have a single checkbox for each user option rather than one for each option
per layer.
Use the TRIGGERCONTROL() and READCONTROLVALUE() functions to work out what
list item was selected when the list selection changes, then populate each
option checkbox with the valid information for that selected layer.
The list box is populated each time the sub starts by gathering a list of
open layers into a string array and populating the list with that array.
This way every time the sub starts the list of open layers can be different
and the sub will still react dynamically to give the information you
require.
I hope this helps...
Regards,
Stephen White
Analyst / Developer
ERSIS Australia Pty Ltd
Suite G7 Paspalis Centre
Darwin, Northern Territory
Ph: +61 8 8941 3906
Fax: + 61 8 8941 3670
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Visit ERSIS' home page at: http://www.ersis.com.au
<http://www.ersis.com.au/>
Visit Encounter at: http://www.encounter.ersis.com
<http://www.encounter.ersis.com/>
Visit the DataMall at: http://www.datamall.com.au
<http://www.datamall.com.au/>
The views expressed in this mail are not necessarily those of ERSIS
Australia Pty Ltd.
-----Original Message-----
From: Daniel Budmiger [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 07, 2000 1:24 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: MI Preserve Dialog
thanks for your help,
i actually want to create a dialog where the user can enable or disable the
layers he wants to show.
as i don't know how many layers are open i first have to find it out. lets
say there are seven layers.
how can i now create a dialog in mapbasic where there are seven checkboxes
and the next run of this sub there are then nine layers.
somehow there must be sort of a loop in this dialog statement and this is my
problem.
greetings and thx for your help
----- Original Message -----
From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
To: 'Daniel Budmiger' <mailto:[EMAIL PROTECTED]>
Sent: Wednesday, July 05, 2000 8:12 PM
Subject: RE: MI Preserve Dialog
i am not exactly sure what u r trying to achieve...
But if you are just wanting to change StaticText control...
Then you can create global String Variables and assign values to that...
Then whenever you open a dialog.. you say
Control StaticText
Title gszThisTitle
Is this what you are looking for?
Yas
Software Engineer
voice: (918) 877.6704 or (800) 727.6774
fax: (918) 877.6960
web: http://www.mpsisys.com <http://www.mpsisys.com/>
email: [EMAIL PROTECTED]
-----Original Message-----
From: Daniel Budmiger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 05, 2000 10:52 AM
To: [EMAIL PROTECTED]
Subject: MI Preserve Dialog
In my mapbasic program I want to update my dialog with some control
statements after I clicked OK. Just adding different controls is no problem.
I want to add it after the dialog is already closed. It would even be better
to add for i=1 to 10 control statictext's. I already tried with the preserve
order but did not succeed.
Is there a possibility to do this in a loop like this?
Thanks for your help.
Daniel Budmiger
/////////////////////////////////////////////////////////////////
NPOCOM.informatik-services
-------------------------------------------
http://www.npocom.ch <http://www.npocom.ch> / [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Tel +41 1 297 91 11 / Dienerstrasse 15
Fax +41 1 297 91 22 / CH-8004 Zuerich
/////////////////////////////////////////////////////////////////
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]