EVENT_MOUSEMOVE in textarea?
BlitzMax Forums/MaxGUI Module/EVENT_MOUSEMOVE in textarea?
| ||
Is it possible to get EVENT_MOUSEMOVE, EVENT_MOUSEDOWN, and other such events when the mouse is over a text area? I'm willing to alter a modules code, if that is necessary. Just point me in the right direction. |
| ||
Actually, what I really want to do is to have clickable text in a text area. A hyperlink, essentially. The above request is made under the assumption that I'll have to hack something together. If there is an easier solution though, I'm all ears. |
| ||
Do you need to be able to edit the text? If not, why not go for an html gadget. |
| ||
No need to edit the text, but the text is going to be updated rapidly, and it looks quite poor refreshing the html gadget every second or so. The application that I need this for is a MUD client. I'd love to have highlighted, clickable enemies/exits/items of interest and have a custom context menu pop up. |
| ||
Even a TEXTAREA_READONLY will fire a GadgetSelect event when they click on some text, you could use the TextAreaCursor function to work out what word they have clicked on, then maybe activate another gadget to hide the flashing cursor again. There is a new TEXTFORMAT_UNDERLINE you can use to indicate the hotlink nature of any words. |
| ||
Thanks Skid. I've got the text underlined and colored, at the moment. I was thinking of doing something like you mentioned, working out what word they clicked on. It's not imperative or anything, but I was hoping that I'd be able to detect when the mouse cursor was over selectable text and change the icon accordingly. That's why I was hoping to catch EVENT_MOUSEMOVE when the cursor was over the text area. Then I could hack something together that calculates what text the mouse is over and have it respond appropriately. I suppose that's a lot of work for something so trivial - but it's not like a MUD client is doing a whole lot else so I'm sure I could spare the CPU cycles. |