This event contains information about an interaction with a highlighted
URL in a TextCtrl that has been initialised with the
style TE_AUTO_URL
.
To process a TextUrlEvent, use the evt_text_url
event handler to
direct the event to a block that takes a CommandEvent argument. Pass the
id of the TextCtrl to the event handler.
evt_text_url(id) { | event | … } | Process a text url interaction |
When an event handler is defined, all mouse interactions with URLs in
the TextCtrl will fire an event. This means that not only button clicks,
but mouse motion into, within and out of the URL area will trigger the
handler. While this adds flexibility, it also means that you will probably
need to determine what mouse action was taken to decide how to respond
to the event.
This can be done by calling the
TextUrlEvent#getmouseevent method and using the
methods defined for MouseEvent to determine whether
the event was a mouse click, which button was clicked, and so on:
Returns the MouseEvent associated with this interaction.
Returns the text of the URL that is being interacted with.
This is a convenience method for calling:
get_event_object.get_value[get_url_start .. get_url_end]Returns the first character position of the URL string within the containing
TextCtrl’s contents.
Returns the last character position of the URL string within the containing
TextCtrl’s contents.
[This page automatically generated from the Textile source at 2023-06-13 21:31:43 +0000]