Hi Giles,

Yes, you have to use a command string to generate your complete dialog 
statement and then run the command statement at the end. Then you can generate 
as many fields as you like:

Dim sCommand as String

sCommand = "Dialog Title "+CHR$(34)+"Please fill in DATA fields"+CHR$(34)       
'CHR$(34) = "
Ddist = 10
For i = 1 to x
sCommand = sCommand + " control popupmenu ID "+i+" title from variable Y 
Position 100, "+ddist
Ddist = ddist + 15
next x

...
Run command sCommand

Best regards
Jacob K. Joergensen
 
Watertech a/s
Soendergade 53      
8000 Aarhus C
watertech.dk     Tel.: +45 8732 2020
Fax: +45 8732 2021
Direct tel.: +45 8732 2078
[EMAIL PROTECTED]
                

-----Oprindelig meddelelse-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Giles
Sendt: 13. januar 2006 20:43
Til: [email protected]
Emne: [MI-L] Drop-down boxes to populate tables


Hello there,

I am an experienced MapInfo user and have just purchased MapBasic.  I need to 
come up with an easy way of creating custom proformas with drop down boxes to 
poulate tables in the field on tablets.  I have been looking at the 'control 
popupmenu' function within the 'dialog' function, does anyone have any ideas?  
I have tried to do it by looping x number of times and adding a new drop down 
box for eah loop:

i.e. 

X = number of columns
Y = dropdown list string
ddist = the distance down from the top of the dialog box of each drop down box

dialog
title "Please fill in DATA fields"

Ddist=ddist+10


'then the loop
For x = 1 to x
control popupmenu
ID x
title from variable Y
Position 100, ddist

next x


This doesn't seem to work am I barking up the wrong tree completely?  Is there 
a simple way of building data input boxes for tables?

Any help would be greatly appreciated

Giles
-- 
  Giles
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Does exactly what it says on the tin

_______________________________________________
MapInfo-L mailing list
[email protected] 
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to