Kingsley,

MI Pro's in C++, having the full set of Windows controls available.
In MB you only have access to a smaller subset.
But: you can cheat MB somewhat, to achieve some dynamic behaviour.

When defining the MB dialog box, you may enter dialog size parameters,
and you can hide controls from within the dialog box.
Combining these, you can do something like:

Global nCount as integer

Sub Xxxx
 Dim dy as integer

nCount = 3  'any number from 1 - 9
dy = 5 + nCount * 10

Dialog
     Title "Dynamic sized dialog box"
     Height dy + 25
     Calling HideTheUnnneccesaryControls
     Control CheckBox Position 5, 5 ID 1 Title "Item 1"
     Control CheckBox Position 5,15 ID 2 Title "Item 2"
     Control CheckBox Position 5,25 ID 3 Title "Item 3"
     Control CheckBox Position 5,35 ID 4 Title "Item 4"
     Control CheckBox Position 5,45 ID 5 Title "Item 5"
     Control CheckBox Position 5,55 ID 6 Title "Item 6"
     Control CheckBox Position 5,65 ID 7 Title "Item 7"
     Control CheckBox Position 5,75 ID 8 Title "Item 8"
     Control CheckBox Position 5,85 ID 9 Title "Item 9"
     Control OkButton Position 5,dy
End Sub

Sub HideTheUnnneccesaryControls
 Dim i as integer
     For i = nCount + 1 To 9
          Alter Control i Hide
     Next
End Sub

Off course it's not completely dynamic, as the number of checkbox'es
are limited (here to 9), but to the user it'll appear dynamic in size.

Hope this helps you get what you want.

Regards
Lars Nielsen

**********************************************************
Lars Nielsen                                [EMAIL PROTECTED]
Development Manager, Special Products Contact
Kampsax Geoplan Odense               http://www.mapinfo.dk
Authorized MapInfo Distributor in Denmark & Norway
Address: Rugaardsvej 55, DK-5000 Odense C
Telephone: +45 6313-5000           Facsimile +45 6313-5090
**********************************************************




Kingsley Gum <[EMAIL PROTECTED]> on 29-01-99 18:23:22

To:   [EMAIL PROTECTED]
cc:
Subject:  MI MB - Layer Control dialog




I would like to create a dialog that does essentially the same as the Layer
Control dialog in MapInfo with a few different functions. What I do need is
the listbox of open tables and associated checkboxes. In the absence of
looping controls I can't see how to create a dialog that creates only as
many checkboxes as there are tables listed. MI's Layer Control does it so
there is obviously a way. But in the Layer Control the checkboxes are
positioned inside the area that we would assume is the listbox (white)
area. So I gather the LC dialog in MI has been created using code that is
not available to users of MB. In this case what alternatives are there?
Also can someone explain how MI has created this dialog.
Does someone have some informative sample code?
NB: I have checked previous archived mail on this, but responses provided
only relatively makeshift and partial solutions.
TIA
Kingsley
K Gum
Senior Research Assistant
Australian Housing and Urban Research Institute
Queensland University of Technology
Ph: (07) 3864 1750      Fax: (07) 3864 1827
Email: [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]




----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to