Marco The dialog statement has a 'calling' clause which allows you call a handler sub to modify it at runtime - the UI is not the most powerful selling point in MapBasic but you can do stuff.
Suggest you have a list of checkboxes and set the title for each in your dialog handler using 'Alter Control' - then hide the extra checkboxes if you have more than you need. Have each checkbox call the same handler routine. If you use an array you'll be able to refer to the same column name or number in your dialog handler and the handler for the checkboxes. HTH Paul Crisp Syntegra Innovation Place Delta Bank Road Newcastle NE11 9DJ Tel 0191 461 4522 Fax 0191 460 1987 -----Original Message----- From: Marco Kok [mailto:[EMAIL PROTECTED]] Sent: 03 December 2002 10:43 To: MapInfo-L (E-mail) 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 ******************************************************************** This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you Check us out at http://www.syntegra.com ********************************************************************