Re: How to get ride of empty squares in wx.dataview.TreeListCtrl?

Andrea Gavana <[email protected]> Wed, 13 Jun 2018 18:52:48 +0200
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <CAEf70bzT0098uB6-Qod6pSrsESoSF_miVBBrna=pwchtxLXsiQ@mail.gmail.com>
Hi Gabrielle,

On Wed, 13 Jun 2018 at 18.19, Gabrielle C <[email protected]> wrote:

> Hi Andrea,
>
> Thanks for your help..
>
> I called them "squares" because when I click they don't check.. so, I
> thought these were not checkboxes :P
>
> About the style, when you mentioned I started to test all flags, the
> highlight didn't change anything (I could even still highlight/select
> rows...) but the TR_DEFAULT_STYLE made the difference, removing this style
> I don't see squares/checkboxes anymore.. but the space was not filled...
>
>
> <https://lh3.googleusercontent.com/-FWx_K2Ydn7U/WyFD3EqrqlI/AAAAAAAAPtY/CnDLIO8MIMkE3pqmRgEtdshPRJOVxeBVwCLcBGAs/s1600/Screen%2BShot%2B2018-06-13%2Bat%2B12.18.04%2BPM.png>
>
>
>
> Do you know how can I get ride of this empty space?
>

I’m not a huge expert, nor a particular fan of wx.dataview itself. I’m not
in front of a computer so I can’t help you anymore. Did you try the
wxPython demo? Does it show the same issue?

You may want to consider using wx.lib.agw.hypertreelist instead of
wx.dataview.TreeListCtrl and see how it goes.

Andrea.


>
> On Wednesday, 13 June 2018 12:11:01 UTC-4, Infinity77 wrote:
>
>> Hi Gabrielle,
>>
>> On Wed, 13 Jun 2018 at 18.03, Gabrielle C <[email protected]> wrote:
>>
>>> I am new at the library (and therefore in the group) so, I am sorry if I
>>> can't ask this here you can remove if not...
>>>
>>> I asked the same question on stackoverflow but nobody answered, from
>>> what I saw the community i more engaged in forums and groups than in
>>> stack...
>>>
>>> I am using the following code to create a TreeList:
>>>
>>> tree = wx.dataview.TreeListCtrl(self, -1, style=wx.TR_DEFAULT_STYLE | \
>>>                                         wx.TR_FULL_ROW_HIGHLIGHT | \
>>>                                         wx.TR_EDIT_LABELS
>>> tree.AppendColumn("Item Name")
>>> node = tree.AppendItem(parent_node, text)
>>>
>>> And for some reason there's an empty square (see image bellow)
>>>
>>> [image: enter image description here]
>>> <https://i.stack.imgur.com/2VadP.png>
>>>
>>> I even tried to add item as this:
>>>
>>> node = tree.AppendItem(parent_node, text, wx.NO_IMAGE, wx.NO_IMAGE)
>>>
>>> or
>>>
>>> node = tree.AppendItem(parent_node, text)
>>> tree.SetItemImage(node, wx.NO_IMAGE, wx.NO_IMAGE)
>>>
>>> But none worked... any hint?
>>>
>>>
>>
>> Do you see the same “squares” (they’re actually checkboxes) if you remove
>> the wx.TR_FULL_ROW_HIGHLIGHT style?
>>
>> Andrea.
>>
>>
>> You received this message because you are subscribed to the Google Groups
>>> "wxPython-dev" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "wxPython-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.