Page 2 of 2

Re: Display of wxStaticText in GTK+3

Posted: Tue Mar 24, 2020 10:55 pm
by raananb

OK, forget the webkit.

There still is no explanation why the application cannot produce the panel under GTK as produced by the Windows version (see

The panel (in French) contains the data produced by a stock exchange in response to a user query.

The time element ("Dernier cours : 24-03-2020 17h06") is part of the answer to the query, and changes all along the day. It is not necessarily the time the user posted the query (after the stock exchange closes it remains unchanged until the stock exchange opens).

I hope this clarifies the date issue.

Re: Display of wxStaticText in GTK+3

Posted: Wed Mar 25, 2020 3:51 pm
by DavidHart
I've not been following the thread closely and I'm unsure what exactly are your current problem(s). But I wonder if part of the solution might be to use wxWindow::GetTextExtent on the part of the string to be displayed, so that you can pass an accurate length to SetMinSize().

Re: Display of wxStaticText in GTK+3

Posted: Wed Mar 25, 2020 10:35 pm
by raananb
@David Hart

Thanks for your suggestion.

In the meantime I replaced the wxStaticText by a two-cell grid which receives the fixed text in the first cell and the variable text in the second. This works in all plateforms and does the job. In fact it is even better-looking than wxStaticText...

I tested GetTextExtent and it does the job. But isn't this the role of Fit()?