wxTreeListCtrl weird rendering issue in Ubuntu 10.04 Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
DavidKlecker
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 232
Joined: Sun Nov 29, 2009 10:35 am

wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by DavidKlecker »

If I use a wxTreelistCtrl and load the application in Ubuntu, the control renders fine, but a "ghost" window also renders. I don't have a picture, but it's just a blank window that covers up static text and always renders in the upper left hand control of the window it was placed on. I'm not quite too sure why this is happening specifically but I do know that it is the wxTreeListCtrl that does cause it.

any ideas?

thanks!
DavidKlecker
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 232
Joined: Sun Nov 29, 2009 10:35 am

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by DavidKlecker »

I updated to the newest version which I think is 11_04 but I still get the issue.

Here are two screen shots of the issue. The first screenshot is of the issue seen on my netbook on Linux.
Screenshot-AutoHARP.png
And this is a screenshot from Windows of the same thing but what it should look like.
mainscreenscreenshot.jpg
The first one is clipped because my netbook cannot display the full window on its little screen. ;)
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by doublemax »

Looking at the screen shots, i don't think the wxTreeListCtrl is the problem.

Does the "treelist" sample display correctly?

Double check the parent/child relationships of all the controls.
Try temporarily disabling removing all wxStaticBoxes - they tend to cause these kind of problems sometimes.
Use the source, Luke!
DavidKlecker
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 232
Joined: Sun Nov 29, 2009 10:35 am

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by DavidKlecker »

If I resize the window or move the treelistctrl outside the sizer it's in to another sizer (which will change it's dimensions) the grey area changes as well to same shape so it is a confirmed "echo" of the treelistctrl located at 0,0. Adding in SetSizehints doesn't effect it either nor does moving it to another sizer and everything seems to be in order with the sizers and their parents and childs.
DavidKlecker
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 232
Joined: Sun Nov 29, 2009 10:35 am

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by DavidKlecker »

I've isolated the issue. The issue deals with the wxTreeListCtrl and the style HAS_BUTTONS. Whenever you set this flag you get the effect shown in GTK. If I remove the flag the grey zone disappears.
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by doublemax »

wxTreeListCtrl does not derive from wxTreeCtrl, wxTR_HAS_BUTTONS is not a valid style for this control. The value for wxTR_HAS_BUTTONS is 0x0001, which is the same as wxTL_MULTIPLE. Does that conflict with any other style you're setting?
Use the source, Luke!
DavidKlecker
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 232
Joined: Sun Nov 29, 2009 10:35 am

Re: wxTreeListCtrl weird rendering issue in Ubuntu 10.04

Post by DavidKlecker »

Well that's strange because in the treelistctrl.cpp file there is this line
bool HasButtons(void) const
{ return (m_imageListButtons) || HasFlag (wxTR_TWIST_BUTTONS|wxTR_HAS_BUTTONS); }
Ah.. I found wxTR_HAS_BUTTONS under treebase.h and yeah it conflicts with one of the other defined constants. Well redefining the conflicted value didn't fix it so now I'm just going to bypass all possible ways of it conflicting and just define my own constant with my own value and...... that didn't work?! what a minute.... *facepalm*

It's not wxTR_HAS_BUTTONS.... it's wxSIMPLE_BORDER.

:oops: :oops: :oops:

If you don't define a BORDER style, the above happens in GTK. Well...

Sorry for the mix up but thank you still for the help. =D>
Post Reply