Using ToolButton repeatedly in MapInfo 19

36 vistas
Ir al primer mensaje no leído

Evgeny Kleiman

no leída,
24 jul 2021, 4:55:09 a.m.24/7/21
para MapInfo-L
I have a ToolButton with a handler:
Dim tlbMyPolyline as This
tlbMyPolyline = MICtrlCollAddStrStrInt(groupControlColl, "tlbMyPolyline", "Draw new segment", ControlType_ToolButton)
...
'Handler 
Call SetRbnToolBtnCtrlCallingHandler(tlbMyPolyline, "MyPolyline")
'****************************
Here MyPolyline is a subroutine. It contains, particularly, an instruction
   Run Menu Command M_TOOLS_POLYLINE
This allows to draw a polyline and then the sub processes the result.
The button and handler work fine at first time. But if to try to draw a new line without to click the button once more the handler does not work. I have to note that the same code
works in MapInfo 15 without additional clicks. Could the problem be solved?
Thank you.

Peter Horsbøll Møller

no leída,
27 jul 2021, 1:09:36 a.m.27/7/21
para mapi...@googlegroups.com
Your sub procedure shouldn’t call the standard polygon tool. Instead you should use CommandInfo to get to the object drawn with your custom tool button.
You are also required to insert this object into the table.

In your example, the user is switched from using your custom tool to using the standard polyline tool when you use  Run Menu Command M_TOOLS_POLYLINE

Peter Horsbøll Møller
Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 


Den 24. jul. 2021 kl. 10.55 skrev Evgeny Kleiman <evgeny...@gmail.com>:



This message originated Externally. Use proper judgement and caution with attachments, links, or responses.


--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/90a3cf15-38db-48b4-a056-22194e072c79n%40googlegroups.com.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos