Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6521

C/C++ • GtkMM 4.x questions: version, ColumnView and Dropdown

$
0
0
Hi

I have three questions relating to Gtkmm 4.x on bookworm 64-bit, but I assume the same holds for 32-bit.
These may or may not reveal holes in my knowledge of GTK4, and I am prepared to be informed/chastised/lambasted or ridiculed appropriately...

Q1: The current version is 4.8, I assume this follows debian repos, since there isn't a Pi specific version.
Any idea when/if a later version would be available, or would I have to build my own (ugh!)?
Obviously, I would rather not. I like being able to say "run apt to install xyzzy and plugh, and then this will work 'out of the box'".

Q2: I am using a ColumnView (inside a scrolled window) to display information.
However, there is a behaviour that is really irritating. If I refresh the data the column sizes alter. I know that this is because the view is auto-fitting the column widths. Is there a way to suppress this auto-fit so I can initially split the columns across the screen, but allow the user to resize them?

This is not as trivial as it sounds. I have three columns, one of which is a checkbox to allow rows to be selected, and the other two are textual data. I recognise that the data won't all fit in some cases.

I know about set_fixed_width(), but I would need to do some rough calculations.
My list is inside a scrolled window (which is inside a box, which is inside....). Effectively, I need to know how wide the scrolled window is and take it from there. I think what I really want is to get the outer container's width instead.
The app is running full-screen, so resizing the windows isn't *likely*, so how do I do that? More importantly, when can I do that to avoid nasty flickering as stuff shifts around when I set sizes?

Most of the widgets are set up during the construction of various classes, so (as I had previously experienced with MS W**d*ws) I would need to make sure I set the sizes up at the right time.

Q3: I am using a Dropdown to display various information to the user. The window for this is a vertical box, with a dropdown at the top, and a details panel underneath. I have successfully handled the relevant signal(s) so that the details panel is updated correctly.
However, I have a small issue with Dropdown, concerning the selection list.
Because I am running on a smaller screen (Pi Touchscreen) I have turned up the font size for the application using CSS. (I am also not using the default font family in most cases). Aside from having to be more careful when using MessageDialog, as I have to set up the CSS provider for the dialog and any contained controls, it all works well except for the selection list.
Try as I might, I cannot seem to get hold of this widget to add a CSS provider.
There doesn't seem to be anything I can handle when the popover is shown so that I could get hold of it, and it is starting to irritate me.
My advanced years and optical issues mean that I am struggling to read it, but more to the point, it isn't consistent.

Does anyone know how I can 'style' this popover, or intercept before it is shown in some way?

(Back in the bad old days when I used to program for a different W**d*ws system, in W95 the only way to get hold of a listbox part of a combo-box involved an ugly hack using C, which in C++/MFC I was able to encapsulate in a derived class).

Thanks for any advice or assistance in advance.

Statistics: Posted by SteveSpencer — Fri Jun 21, 2024 1:25 pm



Viewing all articles
Browse latest Browse all 6521

Trending Articles