Title: RE: [MI-L] Iconnumbering (was Seting default MBX folder location)

 Hi,

In the DLL you'll have to use the numbers. And remember that the odd numbers are the small icons and the big icons are the small icon + 1.

You can create a .def file to go with the dll. In this .def file you can create a set of defines that you can use to give the icon numbers a more readable name like this:

'***********************************************
' DBIcons.def
'***********************************************
Define  FILE_DLL_DB_ACTIONS     "DBIcons.dll"

Define  ICON_NO_DB_DELETE       1
Define  ICON_NO_DB_ADD  3
Define  ICON_NO_DB_UPDATE       5

In this way it will be easy to read the syntax of the buttonpad.

Include "DBIcons.def"

Sub Main

Create ButtonPad "DBActions" As
        PushButton
                Icon ICON_NO_DB_DELETE File FILE_DLL_DB_ACTIONS
                ...
        PushButton
                Icon ICON_NO_DB_ADD File FILE_DLL_DB_ACTIONS
                ...
                ...

End Sub

HTH,

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

"For enden af regnbuen..." - hvordan kommer man dertil og er det overhovedet muligt?
Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Rakesh Rao

Sent: Friday, September 15, 2006 7:20 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] Seting default MBX folder location


Hello,

I am new to MapInfo MapBasic programming and am trying to create a toolbar DLL. Is it mandatory to give the icon ID's as numbers like 101, 102 etc as shown in the MapInfo knowledge-base  sample or can we have meaningful names like "ADD" , "DELETE" etc.

If this is possible, how do we differentiate or tell MapInfo which is the small icon and which is the big icon for each button.

Any help is appreciated.

- Rakesh Rao [ rakesh.rao (at)4d-technologies.com ]
- Four Dimension Technologies
  [www.4d-technologies.com]
- Get GeoTools, Work smarter: www.4d-technologies.com/geotools
- Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter

_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to