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: 488
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Display of wxStaticText in GTK+3

Post by raananb »

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: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Display of wxStaticText in GTK+3

Post 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().
raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 488
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Display of wxStaticText in GTK+3

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

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