UltimateListCtrl -- SetHeaderHeight does not work

Win-11 64-bit:
wxPython-4.2.0-cp39-cp39-win_amd64.whl (installed via pip):
Python 3.9.10 stock:

*Description of the problem
Cannot control the height of the column headers in UltimateListCtrl:
In the example code, the text in each column is default size but has 2 newlines. This requires
increasing the column height to see the entire header but .SetHeaderHeight does nothing.

import wx
        
from wx.lib.agw import ultimatelistctrl as ULC
import wx.lib.agw as AGW

hdrCol0 = f'Spanish\n(Americas)\ntext'
hdrCol1 = f'Spanish\n(Americas)\naudio'


app = wx.App(redirect=True)
top = wx.Frame(None, title="Bad Header-Row Height", size=(500,400))

agwStyle = ( ULC.ULC_HAS_VARIABLE_ROW_HEIGHT | wx.LC_REPORT )
progress = ULC.UltimateListCtrl(top, agwStyle=agwStyle)

progress.InsertColumn(0, hdrCol0)
progress.InsertColumn(1, hdrCol1)


# The following line does NOT change the height of the
# column-header row regardless of its value, so I cannot
# make the headers completely visible
progress.SetHeaderHeight(200)


top.Show()
app.MainLoop()

Hi,

This looks like a Windows issue as it appears to work on linux/gtk3.

Screenshot at 2022-08-20 13-44-44

Using: Python 3.10.4 + wxPython 4.2.0 gtk3 (phoenix) wxWidgets 3.2.0 + Linux Mint 21

well, it’s not Windows :rofl:

Thank you for your interest. I think you are saying that you got it to work on Windows. ??
If so, I don’t see what you did to make it work. Could you please explain?

Many thanks.

it’s a bug :disappointed_relieved:

the modification will take some time & if you want to get on you may change the source in the python folder under …Lib\site-packages\wx\lib\agw\ultimatelistctrl.py on line 10938 and change the 0 into a 1 (you may compare the picture I’ve put up before)
what you have to remember is every time you pip-down a wxpython that modification will be mangled until the bug has been removed
I hope that isn’t to cumbersome & doesn’t spoil your ambitions :smirk_cat:

Georg,

Thank you, thank you, THANK YOU!

I very much appreciate your solution and advice.

Georg,

Now that I tried it and see that the change refers to the proportionality number in the sizer, it seems to me not to solve the issue that .SetHeaderHeight(N) does not work. Changing the proportionality from 0 to 1 makes the header height grow indefinitely as the top-level window grows, whereas the SetHeaderHeight should set it to specific and unchanging height of N.

Or am I missing something?

Thx again for your interest.

well, I don’t think you are missing anything, in fact you are seeing, as far as I can judge, a work in progress (plenty of TODOs in the source, right down to basics, f.i. your loved SetHeaderHeight takes pixels & GetHeaderHeight returns a tuple
I simply had a quick look into the source (I’ve never used that thingamajig) and simply saw that 0 stretch factor & flag grow doesn’t make sense (GTK seems to take a decision on behalf of the undecided, and they are in abundance) and, all of a sudden, your two lines were visible (even if you pump stuff into the list, as done in the sample, it looks pretty strange)
so all in all it must have been a turbulent brain storming in those days about the simple idea of a list on a computer screen and, as everyone can see on the internet, the race is still on :see_no_evil: :hear_no_evil: :speak_no_evil:

Georg,

A shame, as it means I’m unlikely to see the problem resolved soon. Nonetheless, I quite enjoyed your sense of humor in your reply.

Thank you!

I once wanted to catalogue my pictures (earlier on Panoramio, afterwards, of course, on its buyer Google) and looked for a list like

image

thumbnails, quarterly performance, sorting, finding, filtering etc and noticed that below a handmade scrollable there were only basics (although ultimate sounds good but for me it smelled too much of marketing)
luckily with python it’s easy to keep track on the structure one wants (programming without paintings) and the scrollable is still going strong in the browser world & in wx, I think, it works flawlessly, knock on wood!!

here is a little abstract of the coding to support the gist of this site :woozy_face:

ChuckM_scrwin_blth.py (12.3 KB)