I'm kind of curious to know whether the Command String way actual will work. Especially if you need a variable for the title. As I remember it you then have to declare this variable thru the command string as well, but I might be mistanken ??!!
What I do, is that I create a dialog with let's say 10 popupmenu controls hidden. When loading the dialog at runtime it is decided have many of these controls actual are needed. These will be turned on an the rest will remain hidden and disabled. If 10 isn't enough you can do it with 20, 30 or more, but at some point, there will be too many and you will need another way. Here I would recommend a listbox with a description of the column to update. When the user clicks on a values, a popupmenu below the listbox is filled with the values, that the user can choose from. This can also be combined with a textbox for more simple data input for some of the columns. Peter Horsbøll Møller GIS Developer, MTM Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Watertech - Jacob K. Jørgensen Sent: Monday, January 16, 2006 11:36 AM To: Giles; [email protected] Subject: SV: [MI-L] Drop-down boxes to populate tables 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 _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
