Hi all !
I'm trying to use a UltimateListCtrl in LC_VIRTUAL mode because I need
display data from a database.
It works good, not as fast as the virtual wx.ListCtrl but enough.
What I want is to display a multiline text (that's why I try
UltimateListCtrl) but in virtual mode !
the problem is the line height is not enough high to display a
multiline text so I'm thinking about a custom renderer to control the
line height but how to do that in virtual mode ?
Is it the right way ?
Somebody can give me an example ?
Thank you
Sébastien
Have you taken a look at the ULC demo? I think it has a multiline TextCtrl in it.
checks
Ok I think you need to pass the “ULC_VARIABLE_ROW_HEIGHT” style
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Hi, thank you for the answer.
I checked the demo but in the case of textctrl it doesn’t use virtual mode and I really need it because I have 800 entries to display and using classic ULC_REPORT is incredibly slow
I simply need to set the row height to another value than the default one… but I don’t know how do that
ULC_HAS_VARIABLE_ROW_HEIGHT is buggy and slow because it check the row content to compute the height
···
2011/2/18 Micah Nordland mpnordland@gmail.com
Have you taken a look at the ULC demo? I think it has a multiline TextCtrl in it.
checks
Ok I think you need to pass the “ULC_VARIABLE_ROW_HEIGHT” style
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
Hi,
Hi, thank you for the answer.
I checked the demo but in the case of textctrl it doesn't use virtual mode
and I really need it because I have 800 entries to display and using classic
ULC_REPORT is incredibly slow
I simply need to set the row height to another value than the default one...
but I don't know how do that
ULC_HAS_VARIABLE_ROW_HEIGHT is buggy and slow because it check the row
content to compute the height
The only way you can do it is to hack the ULC source code and add the
functionality of setting the row height as a method. It is not
implemented yet, the only way ULC can know the row height is to
actually measure it. It should be fairly easy to do (I believe). A
possible strategy would be:
1) Add another style to ULC (something like ULC_USER_ROW_HEIGHT);
2) Inside the GetLineHeight method check if this flag has been set
and, if it has, return the user-defined line height.
3) Provide a patch (to me or on wxTrac - AGW component) so that I can
apply it when I get back home.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==
···
On 18 February 2011 19:37, Sébastien Ramage wrote:
This sounds like fun, where are the styles defined?
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Hi,
This sounds like fun, where are the styles defined?
At the very beginning of ultimatelistctrl.py, on line 199-200, you'll
find a comment like this:
# ----------------------------------------------------------------------------
# UltimateListCtrl constants
# ----------------------------------------------------------------------------
# style flags
The last available style is ULC_FOOTER, you can just add another style
with its own hex value (higher than the previous one) and go from
there ![:slight_smile: :slight_smile:](https://discuss.wxpython.org/images/emoji/apple/slight_smile.png?v=12)
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==
···
On 22 February 2011 15:53, Micah Nordland wrote:
Many thanks Andrea.
I haven't the time to do such hack yet. So I switch temporarily to
wx.grid to do what I want.
Maybe later.
Sébastien
···
On Feb 22, 11:57 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:
Hi,
On 22 February 2011 15:53, Micah Nordland wrote:
> This sounds like fun, where are the styles defined?
At the very beginning of ultimatelistctrl.py, on line 199-200, you'll
find a comment like this:
# ----------------------------------------------------------------------------
# UltimateListCtrl constants
# ----------------------------------------------------------------------------
# style flags
The last available style is ULC_FOOTER, you can just add another style
with its own hex value (higher than the previous one) and go from
there ![:slight_smile: :slight_smile:](https://discuss.wxpython.org/images/emoji/apple/slight_smile.png?v=12)
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.http://thedoomedcity.blogspot.com/2010/03/removal-group-nightmare.html<==
alright, I’m starting to hack! beware! >:)
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Alright, now where do I get the user defined height? I’ve added the style and started work in GetLineHeight.
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Hi,
Alright, now where do I get the user defined height? I've added the style
and started work in GetLineHeight.
I would simply add a method like this to UltimateListMainWindow:
def SetLineHeight(self, height):
"""
Allows to set the line height for all the items.
:param `height`: the custom height for every item, in pixels.
"""
if not self.HasAGWFlag(ULC_USER_ROW_HEIGHT):
raise Exception("SetLineHeight() can only be used with the
ULC_USER_ROW_HEIGHT style set")
self._userLineHeight = height
And then initialize self._userLineHeight as None in the __init__
method of that class. Or something along these lines, you can choose
any implementation style you wish ![:slight_smile: :slight_smile:](https://discuss.wxpython.org/images/emoji/apple/slight_smile.png?v=12)
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==
···
On 23 February 2011 01:43, Micah Nordland wrote:
Ah, that was along the lines I was thinking, I just didn’t know if it existed. I’ll implement it tommorow
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Ok, I’ve got all that stuff implemented, and fixed the mess I made of the indentation
Now all I have to do is write a bit of a demo for it to make sure it all works.
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!
Andrea, How should I set it up so that the UltimateListCtrl can get at the SetLineHeight method in UltimateListWindow? I tried to follow the example of what was already there, but it gives me an attribute error.
···
–
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!