Hi Marco,

The way to do this is to read all the column names from your table into a string 
variable seperated by a semi-colon " ; " and then have your dialog control display the 
variable. 

This part creates the populates the array with the column names


Dim sColumnList as String,
 i as Integer

For i=1 to NumCols(yourtable)
sColumnList =sColumnList +";"+ColumnInfo(yourtable."col"+Str$(i),COL_INFO_NAME)
Next

Then you create your dialog:

Dialog

Control PopupMenu
Title from Variable sColumnList 


Hope this puts you on the right track,

Laurence Seeff
Points Business Mapping Ltd.
22 Tuval St., Ramat Gan, 52522, Israel
 
Tel:  +972-3-6126216
Fax: +972-3-6126323
Email: [EMAIL PROTECTED]
Web: www.points.co.il
  ----- Original Message ----- 
  From: Marco Kok 
  To: MapInfo-L (E-mail) 
  Sent: Tuesday, December 03, 2002 12:43 PM
  Subject: MI-L Flexible Dialogs


  Hi All,
   
  I'm trying to create a Dialog which displays all the columns in a previously
  selected table. They need to be displayed separately. 
  The code I'm trying;
   
          nCols = NumCols(SelectedTable)
   
          Dialog
                  Title "Columns"
                  For i = 1 To nCols
                          Control CheckBox
                                  Title
  ColumnInfo(SelectedTable,"COL"+i,COL_INFO_NAME)
                  Next
   
  But this doesn't work. Is there a way to make this work?
   
  Thanks,
  Marco Kok

Reply via email to