Display of wxStaticText in GTK+3 Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 423
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Display of wxStaticText in GTK+3

Post by raananb » Tue Mar 24, 2020 10:55 pm

Hi,

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 www.pixname.com/0001/Share_values.jpg).

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.

DavidHart
Site Admin
Site Admin
Posts: 3988
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Display of wxStaticText in GTK+3

Post by DavidHart » Wed Mar 25, 2020 3:51 pm

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().

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 423
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Display of wxStaticText in GTK+3

Post by raananb » Wed Mar 25, 2020 10:35 pm

@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...

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

Post Reply