Home »
Public Forums »
archive »
Draw Widgets
Re: Draw Widgets [message #41709 is a reply to message #6435] |
Mon, 22 November 2004 10:26  |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
Pravesh wrote:
> Hi all:
> I am building an interface to use some of the routines i wrote.
>
> The aim is to allow the user to click on the draw
> widget to select a specific pixel and then grow a
> region based on intensity of that pixel. How do we get
> the interface to supply the pixel co-ordinates to the program? it
> seems tricky to achieve it.. i am using david's info structure...
Maybe this is what you are looking for: Set the /button_events keyword
when creating the draw widget (or set the /draw_button_events to
widget_control later). Then the draw widget will create events when you
click your mouse into it. The pixel coordinates are available via
event.x and event.y. If you want to distinguish between left and right
mouse button, press and release, etc., read "Widget Events Returned by
Draw Widgets" in the online help for "widget_draw".
Benjamin
|
|
|
Current Time: Sat Oct 11 03:55:40 PDT 2025
Total time taken to generate the page: 0.75051 seconds