October 29, 2025, 10:09:21 AM

News:

IWBasic runs in Windows 11!


Multiline edit control built-in context menu

Started by Jerry Muelver, February 11, 2008, 11:51:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jerry Muelver

Where does the context menu for right-click in multiline edit control come from? How do I edit/modify/override it?

Jerry Muelver

Because, what I want to do is capture the right-click, and run my own SUB instead of the context menu. I would put things like "Right-to-left reading order", "Show Unicode control characters", and "Insert Unicode control character" in the top menu, due to their infrequent usage (like, never), in my app.

Jerry Muelver

Well, okay, then.... Maybe I can emulate the effect with Accelerator Key trick stuff.

Back to the woodshed....  ::)

Ionic Wind Support Team

Jerry,
You'll need to subclass the control and capture the right click message. 

Paul.
Ionic Wind Support Team

Jerry Muelver

"Subclass"?! You mean, like, Real Programming? Heck, Paul, I'm a story-teller, not a programmer! Although, it might be an interesting story. I'll look into it. Thanks!  ::)

In the meantime, I've got it working with a Ctrl-D accelerator key (easy enough to reach with left hand on keyboard, for most folks), so you can hold Ctrl-D and click the mouse on the whatchemacallit to do the Jer-thing.

App is working well, only needs a couple more features tweaked. Now the question is, who in the world needs a mode-less standalone-wiki multi-page single-file text-editor, anyway?

Jerry Muelver

Quote from: Paul Turley on February 12, 2008, 09:21:24 AM
Jerry,
You'll need to subclass the control and capture the right click message. 

Paul.
Okay. Looks like I need to learn this. Start with Parker's OO tutorials? Something else I can look at? Jump in and edit ebstd.incc or somesuch?

Jerry Muelver

Hmmm... Like this: http://www.ionicwind.com/forums/index.php/topic,1389.0.html

Anything Sapero can do, I can do too! That is, if I were, like, ten times smarter than I really am....  ::)

aurelCB


pistol350

this definition is not the best one could hope for,
but it helps to see clearer.

http://en.wikipedia.org/wiki/Subclass_(computer_science)
Regards,

Peter B.

barry

Here's a fairly good explanation of subclassing.

Someone mentioned OOP but subclassing isn't an OOP term; at least not directly.

I've done it once to see how to do it although I haven't really had any need for it.  I found it a little confusing conceptually but nothing too terrible.  The actual coding was fairly simple.  I didn't use Ebasic so I can't show my little example, assuming I still have it.

Barry

aurelCB

Where is your like you said little example?

pistol350

Hi aurelCB!

This example  may not solve your richedit contextmenu problem but it is about subclassing.
hope that helps.

http://www.ionicwind.com/forums/index.php/topic,2437.msg20928.html#msg20928
Regards,

Peter B.

aurelCB


barry