Hello,
I have an issue with dialog on Linux. Weekday name is displayed outside the transaction dialog's border
And wxChoice widgets are smaller than other widgets in the transaction dialog:
The same dialog on Windows OS looks nice
The code:
https://github.com/moneymanagerex/money ... g.cpp#L398
Please advice how to fix?
How to proper alighn widgets Topic is solved
How to proper alighn widgets
M$, VS2017, C++
Re: How to proper alighn widgets
I guess this the problem.
This text is initially empty and the dialog is big enough for that. But when you change this text, you must re-Layout() the sizer and adjust the dialog size.
But it wouldn't look nice if the size of the dialog changes, each time the user changes the date. So maybe it's better to just reserve a size that's guaranteed to be big enough for all days/translations.
Code: Select all
itemStaticTextWeek_ = new wxStaticText(this, wxID_STATIC, "");
But it wouldn't look nice if the size of the dialog changes, each time the user changes the date. So maybe it's better to just reserve a size that's guaranteed to be big enough for all days/translations.
Use the source, Luke!
Re: How to proper alighn widgets
doublemax, thank you.
We have implemented this hack:
We have implemented this hack:
Code: Select all
//Text field for name of day of the week
wxSize WeekDayNameMaxSize(wxDefaultSize);
for (wxDateTime::WeekDay d = wxDateTime::Sun;
d != wxDateTime::Inv_WeekDay;
d = wxDateTime::WeekDay(d+1))
WeekDayNameMaxSize.IncTo(GetTextExtent(
wxGetTranslation(wxDateTime::GetEnglishWeekDayName(d))));
itemStaticTextWeek_ = new wxStaticText(this, wxID_STATIC, "",
wxDefaultPosition, WeekDayNameMaxSize, wxST_NO_AUTORESIZE);
M$, VS2017, C++