On Sun, 11 Apr 2021 15:01:00 +0200 QuentinC wrote:
Q> I have several questions about wxHVScrolledWindow:
Note that wxHVScrolledWindow is implemented in wx itself, see the code in
src/generic/vscroll.cpp. This means that not only you can usually answer
any questions about it by looking there, but also that you can easily use
the modified version of the same code in your own program if you want to
Q> 1. Is it possible / allowed to have rows with different height ?
Yes, this is the "Var" part.
Q> Columns will always stay constant width.
Using wxVarVScrollHelper, rather than the full wxVarHVScrollHelper, might
be a good idea in this case.
Q> 2. As far as I understand, it is only possible to scroll by the
Q> widtt/height of an entire item. So the first shown item will always be
Q> totally visible and at client coordinates 0, 0.
Q> Is this correct ?
I think so.
Q> 3. How can I deal with text too long to fit for the entire width of the
Q> control ?
You should be able to configure horizontal scrolling independently.
Q> 4. Alternative for #3 if the answer is negative: how can I handle
Q> displaying text on multiple lines ?
Q> Using GetTextExtent, I can know the size needed to display a given
Q> string, but I have the inverse problem: given the client width, how far
Q> can I write / where do I need to cut ?
You can use wxDC::DrawLabel() for this.
TT-Solutions: wxWidgets consultancy and technical support