Don't show wrongly rounded value of π in the internat sample
We formatted the value with lesser precision than was used for displaying it, resulting in unexpected display. Fix this by reducing the number of digits used in the source (because they're lost anyhow when formatting using the default precision) and the precision used when displaying the number. Closes #23192.
This commit is contained in:
parent
f12d35afe2
commit
ec4ff44479
1 changed files with 2 additions and 2 deletions
|
|
@ -415,8 +415,8 @@ MyFrame::MyFrame()
|
|||
grid->HideRowLabels();
|
||||
|
||||
grid->SetColLabelValue(0, _("Number"));
|
||||
grid->SetColFormatFloat(0);
|
||||
grid->SetCellValue(0, 0, wxNumberFormatter::ToString(3.14159265, -1));
|
||||
grid->SetColFormatFloat(0, -1 /* width */, 5 /* we only use 5 digits below */);
|
||||
grid->SetCellValue(0, 0, wxNumberFormatter::ToString(3.14159, -1));
|
||||
|
||||
grid->SetColLabelValue(1, _("Date"));
|
||||
grid->SetColFormatDate(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue