IonicWind Software

IWBasic => GUI Central => Topic started by: Jerry Muelver on February 11, 2008, 11:51:50 AM

Title: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 11, 2008, 11:51:50 AM
Where does the context menu for right-click in multiline edit control come from? How do I edit/modify/override it?
Title: Re: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 12, 2008, 05:29:52 AM
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.
Title: Re: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 12, 2008, 09:14:13 AM
Well, okay, then.... Maybe I can emulate the effect with Accelerator Key trick stuff.

Back to the woodshed....  ::)
Title: Re: Multiline edit control built-in context menu
Post by: Ionic Wind Support Team on February 12, 2008, 09:21:24 AM
Jerry,
You'll need to subclass the control and capture the right click message. 

Paul.
Title: Re: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 12, 2008, 09:59:57 AM
"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?
Title: Re: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 15, 2008, 04:23:47 AM
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?
Title: Re: Multiline edit control built-in context menu
Post by: Jerry Muelver on February 15, 2008, 04:29:49 AM
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....  ::)
Title: Re: Multiline edit control built-in context menu
Post by: aurelCB on May 05, 2008, 11:48:24 PM
What is subclass mr.Paul?
Title: Re: Multiline edit control built-in context menu
Post by: pistol350 on May 06, 2008, 01:30:54 AM
this definition is not the best one could hope for,
but it helps to see clearer.

http://en.wikipedia.org/wiki/Subclass_(computer_science)
Title: Re: Multiline edit control built-in context menu
Post by: barry on May 06, 2008, 08:23:45 AM
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
Title: Re: Multiline edit control built-in context menu
Post by: aurelCB on May 06, 2008, 11:23:09 AM
Where is your like you said little example?
Title: Re: Multiline edit control built-in context menu
Post by: pistol350 on May 07, 2008, 04:29:22 AM
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
Title: Re: Multiline edit control built-in context menu
Post by: aurelCB on May 07, 2008, 05:17:35 AM
Thanks 350 krypt is help me...
Title: Re: Multiline edit control built-in context menu
Post by: barry on May 07, 2008, 11:34:52 AM
I forgot to paste in the link.  Sorry.  Here it is:

http://www.codeproject.com/KB/miscctrl/subclassdemo.aspx

Barry
Title: Re: Multiline edit control built-in context menu
Post by: aurelCB on May 07, 2008, 12:03:35 PM
OK ;)