You will have to use the Run Command statement to create the whole dialog statement as a string.
 
Kind regards
 
Uffe Kousgaard
www.routeware.dk
 
----- Original Message -----
Sent: Thursday, March 16, 2006 6:59 AM
Subject: [MI-L] Create Custom Dialog using MapBasic

Hi All
 
Does anyone know if it is possible to create a MapInfo custom dialog where you pass in the values and perform a loop to construct the "Control" options?
 
I am trying to dynamically create a dialog by reading an INI file that may state that the dialog needs 1,2,3,4 or more "Control Edittext" boxes and the "Values" and "Into Variables" all differ and are set in the INI file.
 
My problem is that MapBasic will not compile stating:
 
"Invalid Dialog command", and "Unrecognised command : Control"
 
Does anyone know how or if a dialog can be created dynamically?
 
 
Example of Code:
 
'===============================================
DIM i, iPosWidth, iPosHeight AS INTEGER
DIM sTitle, sValue, sInto AS STRING
 
iPosWidth = 10
iPosHeight = 10
sValue = "Type your text here"
       
   Dialog 
   Title "My Custom Dialog"
  
   For i = 1 to 10
  
    sTitle = "Field " + i
    sInto = "sField" + i
      
    Control StaticText
     width 50 height 10
     Position iPosWidth,iPosHeight
     Title sTitle
 
    Control EditText
     width 50 height 10
     Position iPosWidth,(iPosHeight + 20)
     Value sValue Into sInto
  
   next
  
   Control OKButton
   Control CancelButton
'===============================================
 
 
Cheers
Ethan Hohneck


_______________________________________________
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