Sure: nBtnID = CommandInfo(CMD_INFO_TOOLBTN)
TriggerInfo is only used for dialogs, but the CommandInfo() function can be used to get the button (and menu) ID that the user pushed 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 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Søren Breddam Sent: Tuesday, January 10, 2006 10:39 AM To: MapInfo-L (E-mail) Subject: [MI-L] How to get id of the button that calls a sub Hi Listers, I've got two buttons on a buttonpad. They both should call the same sub with a minor difference in the actions performed in the sub. I've solved the problem by calling two different subs that call the 'real' sub with a parameter. So, it ain't broken ;-) However, is it not possible to call a sub and get the id of the button that calls it? Something like TriggerControl()... Venligst/regards Søren Breddam Stevns Kommune - www.stevns.dk Vallø-Stevns fusion: www.valloe-stevns.dk * Tlf.: 5656 1891 * GSM.: 2895 3034 _______________________________________________ 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
