Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-12

MWEDIT not taking click events

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Shane Miller: Should we add a gtkeventbox by default when we create a gtk bitmap so it can take the…

+ From: Shane Miller
+
+ Marc,
+
+ Should we add a gtkeventbox by default when we create a gtk
+ bitmap so it can take the onclick events?

??? on a bitmap. I dont think a bitamp needs click events. But as far as I know, mwEdit gets mouse events. It only don't set the focus when you click on it. You can see clickevents if you do de following: If it has the focus (by tabbing into it) type some text, do a mouseclick somewhere in your text and type again (and look). Your insertion point wouldn't move if you didn't get click events.

+ When that event box gets the events it can simply call the
+ windowproc because it's part of the object.
+
+ Also, do you know why it takes 2 arrow keys to move anywhere?
+ Two ups to move one line up and two down to move one line
+ down.

Eehhh... the reason I thought is that gtk moves the focus out of our editor :-) Didn't examin that.

+ Also, the parenthesis "(" causes it to go DOWN one
+ line before printing the parenthesis. Odd...

:-) :-) Not odd. Thats something I'm working on, so if you have some ideas..

In a keypress event gtk returns the char of the key pressed. Delphi wants in a WM_KeyDown event a virtual keycode (VK_...) and in a WM_Char the char of the key pressed. In most cases I was able to convert a gtk_keycode to a VK_... except for VK_0 to VK_9.
The reason is that this is keyboard layout dependent. In my case shft-2 results in a @, on other keyboards maybe something else (I know that spanish keyboards have the @ on another key :-)
So I get a @ from gtk and have to translate this to a VK_ .....

For now it should work if no VK_ is sent for unknown translations (I'll look at it tomorrow)

The reason for your down is that a VK_DOWN has the same value as a "(" (I guess)

Marc

Reply by email

Shane Miller

I updated CVS.

The toolbar is visible now. I get an error when adding more than one button, but who needs more than one!!!!! :-)

I'll look at that tomorrow. I had a tooth pulled Monday so I'm going home to rest...

Shane

Reply by email

Shane Miller

Marc,

Should we add a gtkeventbox by default when we create a gtk bitmap so it can take the onclick events?

When that event box gets the events it can simply call the windowproc because it's part of the object.

Also, do you know why it takes 2 arrow keys to move anywhere? Two ups to move one line up and two down to move one line down. Also, the parenthesis "(" causes it to go DOWN one line before printing the parenthesis. Odd...

Shane

Reply by email