[ gtkD ] Question about mouse press event in Notebook ...

Mike Wey mike-wey at example.com
Mon Apr 22 14:57:50 PDT 2013


On 04/22/2013 10:48 PM, Super666666Super wrote:
> "Look how this issue could be solved for 'general' gtk+. As GtkD is a
> wrapper on gtk+, the answer to your question should not be D-specific."
>
> Hmmm ...
> Thanks, but I'm not sure is it a real bug.
>
> "If you are not doing so already, try returning false from the function
> you pass to addOnButtonPress so it doesn't stop the event from
> propagating."
>
> Better ...
> But it isn't exactly solved my problem ...
>
> I created a simple window without decorations, and I added the Notebook
> to the window.
> I want to add the ability to move the window after capturing the left
> mouse button press event on Notebook.
>
> When I return true I can only move window.
> When I return false I can move window and switch between tabs.
> I can't reorder my tabs. I can do it after comment out the line with
> addOnButtonPress ().
>
> My code is:
> http://pastebin.com/dz6XZZj6
> Compiled successful ...
>
> Is it a bug ?
> I think it's my mistake ...
>
> P.S.
> Sorry for my English.
>
> Thanks for your help.

The begingMoveDrag call in mousepressevent makes it so that you drag the 
window around when holding the left mouse on on of the tabs.
And that prevents you from reordering the tabs.

What are you trying to achieve with mousepressevent?

-- 
Mike Wey


More information about the Digitalmars-d mailing list