no tip when over on customtreectrl

Hi all.

Suppose a panel container of a wx.TreeCtrl is very tight and the label of the treectrl item has not

completely visible, then when you over mouse on item appears tip showing the entire label

But this does not work with the customtreectrl. You see this on demo.

···


Fabio Spadaro
www.fabiospadaro.com

Hi all,

I use a panel which init with SetDoubleBuffered(True), and also some button intance of wx.lib.platebtn

Problem coming, platebtn seems can not work with 'SetDoubleBuffered(True),

How to fix this problem?

Thanks for any comments.

B.regards

2011-12-30

···

curliph


发件人: Fabio Spadaro

发送时间: 2011-12-30 17:47:27

收件人: wxPython-users

抄送:

主题: [wxPython-users] no tip when over on customtreectrl

Hi all.

Suppose a panel container of a wx.TreeCtrl is very tight and the label of the treectrl item has not

completely visible, then when you over mouse on item appears tip showing the entire label

But this does not work with the customtreectrl. You see this on demo.


Fabio Spadaro
www.fabiospadaro.com


To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

···

2011/12/30 curliph <curliph@gmail.com>:

Hi all,

I use a panel which init with SetDoubleBuffered(True), and also some
button intance of wx.lib.platebtn
Problem coming, platebtn seems can not work with 'SetDoubleBuffered(True),
How to fix this problem?

What version of wxPython are you using and on what operating system?

Please also attach a minimal running sample application that
reproduces the issue your seeing
(MakingSampleApps - wxPyWiki). i.e) what is the problem
your having exactly?

Cody

Hi,

Here is a test example, I have comment ‘self.SetDoubleBuffered(True)’

You can try to uncomment it to see what’s difference,

Thanks for your help,

B.regards

2011-12-31

testFrame.rar (10.1 KB)

···

curliph


发件人: Cody

发送时间: 2011-12-30 22:40:10

收件人: wxpython-users

抄送:

主题: Re: [wxPython-users] about wx.lib.platebtn

Hi,

2011/12/30 curliph curliph@gmail.com:

Hi all,

I use a panel which init with SetDoubleBuffered(True), and also some

button intance of wx.lib.platebtn

Problem coming, platebtn seems can not work with 'SetDoubleBuffered(True),

How to fix this problem?

What version of wxPython are you using and on what operating system?

Please also attach a minimal running sample application that

reproduces the issue your seeing

(MakingSampleApps - wxPyWiki). i.e) what is the problem

your having exactly?

Cody

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

···

2011/12/31 curliph <curliph@gmail.com>:

Hi,

Here is a test example, I have comment 'self.SetDoubleBuffered(True)'
You can try to uncomment it to see what's difference,

Sorry but again, What version of wxPython are you using and on which
Operating System?

Also in the future when attaching files, please use a common format
such as gz or zip as its much more likely people will already have
software installed on their systems that can open the files.

Cody

It's wxpython-2.9.2-i386-python-2.7.2, running on WindowsXP sp3.

Thanks for your advice, I will take it next time.

···

On 2012-1-1, at 3:57, Cody <codyprecord@gmail.com> wrote:

Hi,

2011/12/31 curliph <curliph@gmail.com>:

Hi,

  Here is a test example, I have comment 'self.SetDoubleBuffered(True)'
You can try to uncomment it to see what's difference,

Sorry but again, What version of wxPython are you using and on which
Operating System?

Also in the future when attaching files, please use a common format
such as gz or zip as its much more likely people will already have
software installed on their systems that can open the files.

Cody

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

It's wxpython-2.9.2-i386-python-2.7.2, running on WindowsXP sp3.

I am not seeing any difference between using double buffering and not
(Windows 7 / wxPython 2.9.2.4).

Is the button having issues getting drawn on your system? Such as
after you mouse over it the background stays the same or gets
distorted or something along those lines? Will see if I can try it on
a Windows XP machine later in the week.

Cody

···

On Sat, Dec 31, 2011 at 7:17 PM, Curliph <curliph@gmail.com> wrote:

Hi Cody,

Many thanks for your help.

The problem is just as you said,

  1. bitmap can not shown,

  2. background stays while mouse in or clicked.

Best Regards

2012-01-03

···

curliph


发件人: Cody

发送时间: 2012-01-03 10:56:28

收件人: wxpython-users

抄送:

主题: Re: [wxPython-users] about wx.lib.platebtn

Hi,

On Sat, Dec 31, 2011 at 7:17 PM, Curliph curliph@gmail.com wrote:

It’s wxpython-2.9.2-i386-python-2.7.2, running on WindowsXP sp3.

I am not seeing any difference between using double buffering and not

(Windows 7 / wxPython 2.9.2.4).

Is the button having issues getting drawn on your system? Such as

after you mouse over it the background stays the same or gets

distorted or something along those lines? Will see if I can try it on

a Windows XP machine later in the week.

Cody

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

Hi Cody,

Many thanks for your help.
The problem is just as you said,
1. bitmap can not shown,
2. background stays while mouse in or clicked.

I can see the problem on Windows XP though I am not sure of the exact cause.

It is kind of strange, the text is drawn correctly and updates to the
hover over color but the buttons highlight color and bitmap are not
drawn. They do however show up briefly after the window is re-sized.

Seeing as this works correctly on Windows 7 I am not sure how much
time I will have to investigate it to fix it just for XP, but please
feel free to open a bug report for it and will try to investigate when
I can.

Regards,

Cody

···

2012/1/2 curliph <curliph@gmail.com>:

Hi all

treectrl.tif (289 KB)

customtreectrl.tif (289 KB)

···

Il giorno 30 dicembre 2011 10:47, Fabio Spadaro fabiolinospad@gmail.com ha scritto:

Hi all.

Suppose a panel container of a wx.TreeCtrl is very tight and the label of the treectrl item has not

completely visible, then when you over mouse on item appears tip showing the entire label

But this does not work with the customtreectrl. You see this on demo.


Fabio Spadaro
www.fabiospadaro.com

Some time ago I sent this issue but I have not been answered. I send 2 screenshots to better explain.


Fabio Spadaro

Try Sqlite Root a GUI Admin Tools for manage Sqlite Database:

www.sqliteroot.com

The CustomTreeCtrl may not support showing the tips, you've got the full source code so you can read that to be sure. If not then you can probably handle it in your derived class without too much hassle. Basically you would restart a timer for every mouse motion event and if the mouse ever holds still long enough for the timer to expire then you get the current item under the mouse and set the tooltip to that text. (Or perhaps use a wx.TipWindow.) Don't forget to also watch for EVT_LEAVE_WINDOW events so you can stop the timer when the mouse leaves the area.

···

On 2/27/12 1:24 AM, Fabio Spadaro wrote:

Hi all

Il giorno 30 dicembre 2011 10:47, Fabio Spadaro <fabiolinospad@gmail.com > <mailto:fabiolinospad@gmail.com>> ha scritto:

    Hi all.
    Suppose a panel container of a wx.TreeCtrl is very tight and the
    label of the treectrl item has not
    completely visible, then when you over mouse on item appears tip
    showing the entire label
    But this does not work with the customtreectrl. You see this on demo.

    --
    Fabio Spadaro
    www.fabiospadaro.com <http://www.fabiospadaro.com>

Some time ago I sent this issue but I have not been answered. I send 2
screenshots to better explain.

--
Robin Dunn
Software Craftsman

There is also the possibility to bind the wx.EVT_TREE_ITEM_GETTOOLTIP
event in your derived class, and then simply call:

event.SetToolTip('whatever string')

I guess, however, that the tooltip-appearing behaviour should be
built-in when the items are clipped because of lack of horizontal
space. I'll try and see if I can implement it in the next few days. I
wonder why the generic version of wxTreeCtrl in the wxWidgets C++
folders doesn't do that...

Andrea.

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

···

On 27 February 2012 23:29, Robin Dunn wrote:

On 2/27/12 1:24 AM, Fabio Spadaro wrote:

Hi all

Il giorno 30 dicembre 2011 10:47, Fabio Spadaro <fabiolinospad@gmail.com >> <mailto:fabiolinospad@gmail.com>> ha scritto:

Hi all.
Suppose a panel container of a wx.TreeCtrl is very tight and the
label of the treectrl item has not
completely visible, then when you over mouse on item appears tip
showing the entire label
But this does not work with the customtreectrl. You see this on demo.

--
Fabio Spadaro
www.fabiospadaro.com <http://www.fabiospadaro.com>

Some time ago I sent this issue but I have not been answered. I send 2
screenshots to better explain.

The CustomTreeCtrl may not support showing the tips, you've got the full source code so you can read that to be sure. If not then you can probably handle it in your derived class without too much hassle. Basically you would restart a timer for every mouse motion event and if the mouse ever holds still long enough for the timer to expire then you get the current item under the mouse and set the tooltip to that text. (Or perhaps use a wx.TipWindow.) Don't forget to also watch for EVT_LEAVE_WINDOW events so you can stop the timer when the mouse leaves the area.

Good catch. I had forgotten about that event.

···

On 2/27/12 10:51 PM, Andrea Gavana wrote:

There is also the possibility to bind the wx.EVT_TREE_ITEM_GETTOOLTIP
event in your derived class, and then simply call:

event.SetToolTip('whatever string')

--
Robin Dunn
Software Craftsman

Hi,

Hi all

Il giorno 30 dicembre 2011 10:47, Fabio Spadaro <fabiolinospad@gmail.com> ha
scritto:

Hi all.
Suppose a panel container of a wx.TreeCtrl is very tight and the label of
the treectrl item has not
completely visible, then when you over mouse on item appears tip showing
the entire label
But this does not work with the customtreectrl. You see this on demo.

--
Fabio Spadaro
www.fabiospadaro.com

Some time ago I sent this issue but I have not been answered. I send 2
screenshots to better explain.

This issue should now be solved in the latest SVN, where you can use
the agwStyle TR_TOOLTIP_ON_LONG_ITEMS to achieve the effect you are
looking for automatically. See the freshly uploaded documentation for
AGW 0.9.3 for more details.

Andrea.

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

···

On 27 February 2012 10:24, Fabio Spadaro wrote:

Hi,

This issue should now be solved in the latest SVN, where you can use

the agwStyle TR_TOOLTIP_ON_LONG_ITEMS to achieve the effect you are

looking for automatically. See the freshly uploaded documentation for

AGW 0.9.3 for more details.

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.alice.it/infinity77/

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

I do not know if I did correctly, but I just downloaded from
http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/customtreectrl.py?view=log and put in wx-2.8-msw-unicode/wx/lib/agw directory.

The first time i no use
agwStyle TR_TOOLTIP_ON_LONG_ITEMS and this caused a Exception:

Traceback Info:

Traceback (most recent call last):

File “C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw\customtreectrl.py”, line 7583, in OnMouse

self.SetToolTipString(hevent._label)

File “C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx_core.py”, line 10458, in SetToolTipString

return _core_.Window_SetToolTipString(*args, **kwargs)

TypeError: String or Unicode type required

System Information:

Timestamp: 2012-03-06 21:12:29.015000

Operating System: Windows Vista (build 6002, Service Pack 2)

Python Version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

wxPython Version: 2.8.12.1 (msw-unicode)

wxPython Info: (WXMSW, wxMSW, unicode, wx-assertions-on, SWIG-1.3.29)

Python Encoding: Default=ascii File=mbcs

wxPython Encoding: cp1252

System Architecture: 32bit x86

Byte order: little

Frozen: False

The second time i use new agwStyle but it cause crash with destroy of app.

···

Il giorno 05 marzo 2012 22:46, Andrea Gavana andrea.gavana@gmail.com ha scritto:


Fabio Spadaro

Try Sqlite Root a GUI Admin Tools for manage Sqlite Database:

www.sqliteroot.com

HI,

Hi,

Il giorno 05 marzo 2012 22:46, Andrea Gavana <andrea.gavana@gmail.com> ha
scritto:

This issue should now be solved in the latest SVN, where you can use
the agwStyle TR_TOOLTIP_ON_LONG_ITEMS to achieve the effect you are
looking for automatically. See the freshly uploaded documentation for
AGW 0.9.3 for more details.

Andrea.

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

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

I do not know if I did correctly, but I just downloaded from
http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/customtreectrl.py?view=log and
put in wx-2.8-msw-unicode/wx/lib/agw directory.

The first time i no use agwStyle TR_TOOLTIP_ON_LONG_ITEMS and this caused a
Exception:

Traceback Info:
Traceback (most recent call last):
File
"C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw\customtreectrl.py",
line 7583, in OnMouse
self.SetToolTipString(hevent._label)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line
10458, in SetToolTipString
return _core_.Window_SetToolTipString(*args, **kwargs)
TypeError: String or Unicode type required

This should now (hopefully) be fixed in the latest SVN.

The second time i use new agwStyle but it cause crash with destroy of app.

This I have no idea: what kind of crash? Do you have any source
code/sample app to show the problem? It works for me in the demo (so
far).

Andrea.

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

···

On 6 March 2012 21:20, Fabio Spadaro wrote:

Hi,

···

Il giorno 06 marzo 2012 22:19, Andrea Gavana andrea.gavana@gmail.com ha scritto:

This should now (hopefully) be fixed in the latest SVN.

The second time i use new agwStyle but it cause crash with destroy of app.

This I have no idea: what kind of crash? Do you have any source

code/sample app to show the problem? It works for me in the demo (so

far).

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.alice.it/infinity77/

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Work. Thanks.

Fabio Spadaro

Try Sqlite Root a GUI Admin Tools for manage Sqlite Database:

www.sqliteroot.com