Warren,

>>Hello all,

>>Perhaps I've missed something, but I cannot find a way to query if a
>>buttonpad toggle button is in a checked/unchecked state.  <snip>

    I've never figured it out. What I've tended to do is hide it behind an
invisible checkable menu item and then use the
MenuitemInfoByHandler(...,MENUITEM_INFO_CHECKED) function on that menu item
to determine the current status of the toggle button. Obviously within the
calling handler of the toggle button you need to check and uncheck the
invisible menu item. See the example code below. Not sure this will work on
a mapper-by-mapper basis as I don't quite understand your question or the
implications.
Regards,

Dave

include "mapbasic.def"

Declare Sub ExitProc()
Declare Sub TestProc()
Declare Sub Main()

Sub ExitProc()
 End Program
End Sub

Sub TestProc()

 if (MenuitemInfoByHandler("TestProc",MENUITEM_INFO_CHECKED)) then
  Alter Menu Item TestProc
   UnCheck
 else
  Alter Menu Item TestProc
   Check
 end if

 Note("Test called
"+MenuitemInfoByHandler("TestProc",MENUITEM_INFO_CHECKED))
End Sub


Sub Main()
 Create Menu "Dummy" as
  "!TestMenu" Calling TestProc ' create a dummy checkable menu item

 Create Menu "Checkable Test" as
  "Exit " Calling ExitProc

 Alter Menu Bar Add "Checkable Test"

 Create ButtonPad "Test" as
  ToggleButton HelpMsg "TestButton" Calling TestProc
  Show
End Sub



Dave Langley

Mapping Applications Consultant
Dataview Solutions Ltd
London
UK

Telephone:  +44 (0)1635 581355
Mobile:        +44 (0)973 797769

Business email: [EMAIL PROTECTED]
Personal email: [EMAIL PROTECTED]

Dataview Home Page: www.dataview-solutions.co.uk

_________________________________________________________
WARNING - THIS E-MAIL TRANSMISSION IS CONFIDENTIAL.
This e-mail transmission (including any accompanying attachments)
contains confidential information which is intended for the named
addressee only. If you are not the intended recipient, you are hereby
notified that any use, dissemination, distribution or reproduction of
this e-mail is prohibited. If you have received this e-mail in error please
contact us immediately at [EMAIL PROTECTED] Thank you.
_________________________________________________________




----------------------------------------------------------------------
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