List Info

Thread: Two HtmlWindow Questions and One Popup Menu Question




Two HtmlWindow Questions and One Popup Menu Question
country flaguser name
United States
2007-10-17 11:18:06
1. What is the best way to tell the difference between a mouse left-click and a right-click with an htmlWindow OnCellClicked event? Do I need to have another event and handler to capture the mouse click simultaneously? I can't find where any mouse button info is sent with the OnCellClicked event. 

2. How does one deselect text in an htmlWindow with code?
The issue is when I right-click and call an htmlWindow OnCellClicked event the selection stays selected until the mouse is clicked in that window again. If I left-click the mouse in the window the OnLeftClick handler is called and acts on the previously selected text instead of the clicked on text. I see where RichTextCtrl has a SelectNone member, but I cannot find any for htmlWindow.

3. Is it possible to have a popup menu break a long menu into columns?
I have a dynamically created popup menu and sometimes the menu can be longer than the display height. Is there a way to have the menu break at say every 20 menu items and display in columns?

Thanks,
Tim
Re: Two HtmlWindow Questions and One Popup Menu Question
user name
2007-10-17 11:10:25
Hi Tim,

On 10/17/07, Tim Morton wrote:
> 1. What is the best way to tell the difference between
a mouse left-click
> and a right-click with an htmlWindow OnCellClicked
event? Do I need to have
> another event and handler to capture the mouse click
simultaneously? I can't
> find where any mouse button info is sent with the
OnCellClicked event.
>
> 2. How does one deselect text in an htmlWindow with
code?
> The issue is when I right-click and call an htmlWindow
OnCellClicked event
> the selection stays selected until the mouse is clicked
in that window
> again. If I left-click the mouse in the window the
OnLeftClick handler is
> called and acts on the previously selected text instead
of the clicked on
> text. I see where RichTextCtrl has a SelectNone member,
but I cannot find
> any for htmlWindow.

No idea about the first 2 :-D

> 3. Is it possible to have a popup menu break a long
menu into columns?
> I have a dynamically created popup menu and sometimes
the menu can be longer
> than the display height. Is there a way to have the
menu break at say every
> 20 menu items and display in columns?

I don't think the current wx.Menu can do that (but I may be
missing
something), but I suppose something could be done with
FlatMenu to
arrange items in more than 1 column. I'll think about it.

Andrea.

"Imagination Is The Only Weapon In The War Against
Reality."
http://xoomer.alic
e.it/infinity77/

------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


Re: Two HtmlWindow Questions and One Popup Menu Question
country flaguser name
United States
2007-10-19 00:20:44
Tim Morton wrote:
> 1. What is the best way to tell the difference between
a mouse 
> left-click and a right-click with an htmlWindow
OnCellClicked event? Do 
> I need to have another event and handler to capture the
mouse click 
> simultaneously? I can't find where any mouse button
info is sent with 
> the OnCellClicked event. 

event.GetEvent() returns the wx.MouseEvent.


> 
> 2. How does one deselect text in an htmlWindow with
code?
> The issue is when I right-click and call an htmlWindow
OnCellClicked 
> event the selection stays selected until the mouse is
clicked in that 
> window again. If I left-click the mouse in the window
the OnLeftClick 
> handler is called and acts on the previously selected
text instead of 
> the clicked on text. I see where RichTextCtrl has a
SelectNone member, 
> but I cannot find any for htmlWindow.

It doesn't have one.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java
give you jitters?  Relax with wxPython!


------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )