Search found 162 matches

by Ronald
Mon Oct 14, 2019 12:25 pm
Forum: C++ Development
Topic: Is wxListCtrl crossplatform?
Replies: 16
Views: 1638

Re: Is wxListCtrl crossplatform?

#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) #include "wx/msw/listctrl.h" #elif defined(__WXQT__) && !defined(__WXUNIVERSAL__) #include "wx/qt/listctrl.h" #else #include "wx/generic/listctrl.h" #endif A generic implementation is used on platforms where no native control is available. So to b...
by Ronald
Mon Oct 14, 2019 10:55 am
Forum: C++ Development
Topic: Is wxListCtrl crossplatform?
Replies: 16
Views: 1638

Is wxListCtrl crossplatform?

class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase wxListCtrlBase in include\wx\listbase.h wxListCtrl in include\wx\msw\listctrl.h When programming under windows, wxListCtrl is used. Does it mean wxListCtrl is not crossplatform? BTW, no listctrl.h in include/gtk include/gtk1 include/motif inc...
by Ronald
Thu Oct 10, 2019 4:14 pm
Forum: Open Discussion
Topic: Should I use a cross-platform GUI-toolkit or rely on the native ones?
Replies: 2
Views: 3065

Re: Should I use a cross-platform GUI-toolkit or rely on the native ones?

crossplat form lib: Pros 1. crossplatform 2. some morden controls Cons 1. slow, e.g. Qt 2. or not robust/mature enough 3. license LGPL native lib: Pros 1. small 2. fast 3. robust 4. no license problem Cons 1. not crossplatform 2. for Windows, only basic controls For one application, more important o...
by Ronald
Mon Oct 07, 2019 1:19 am
Forum: C++ Development
Topic: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision
Replies: 7
Views: 605

Re: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision

doublemax wrote:
Sun Oct 06, 2019 11:34 am
Sorry, i misunderstood what the problem was.

Although it's hard to believe that such a bug would remain undetected for long, i don't have any other explanation for the behavior. So i think this is a bug, too.
I've filed the bug, U in UNow stands for μ in Greek, the doc will be fixed.
by Ronald
Sun Oct 06, 2019 2:09 pm
Forum: C++ Development
Topic: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision
Replies: 7
Views: 605

Re: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision

The issue can be also easily reproduced like this, using Win32 API for comparison. #include <wx/wx.h> class MyApp : public wxApp { public: bool OnInit() { const wxDateTime now(wxDateTime::Now()); const wxDateTime unow(wxDateTime::UNow()); SYSTEMTIME localTime, systemTime; ::GetLocalTime(&localTime)...
by Ronald
Sun Oct 06, 2019 2:05 pm
Forum: C++ Development
Topic: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision
Replies: 7
Views: 605

Re: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision

doublemax wrote:
Sun Oct 06, 2019 11:34 am
Sorry, i misunderstood what the problem was.
:)
doublemax wrote:
Sun Oct 06, 2019 11:34 am
Although it's hard to believe that such a bug would remain undetected for long, i don't have any other explanation for the behavior. So i think this is a bug, too.
I'll just file it.
by Ronald
Sun Oct 06, 2019 11:09 am
Forum: C++ Development
Topic: wxListView column text display problem
Replies: 2
Views: 373

Re: wxListView column text display problem

doublemax wrote:
Sun Oct 06, 2019 10:54 am
If a bug can be seen in one of the samples, please use http://trac.wxwidgets.org to open a bug report.
bug filed
by Ronald
Sun Oct 06, 2019 11:00 am
Forum: C++ Development
Topic: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision
Replies: 7
Views: 605

Re: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision

static wxDateTime wxDateTime::UNow() Returns the object corresponding to the current UTC time including the milliseconds. Yes, but wxDateTime::Now() will have no milliseconds part. That's why the comparison fails. You can add this line to see the differnce. wxLogMessage("%s %s", now.GetValue().ToSt...
by Ronald
Sun Oct 06, 2019 10:35 am
Forum: C++ Development
Topic: wxListView column text display problem
Replies: 2
Views: 373

wxListView column text display problem

style = wxLC_REPORT | wxLC_VIRTUAL When text fulfills a column header, when column header image shows, the text is ajusted automatically to show with ellipsis, but when image hides, it not adjusts back. The problem also exists in the wxWidgets' listctrl sample. sample code, sorting switch among asce...
by Ronald
Sun Oct 06, 2019 3:54 am
Forum: C++ Development
Topic: About the parameter TimeZone of wxDateTime::Format
Replies: 1
Views: 315

Re: About the parameter TimeZone of wxDateTime::Format

I found the answer.

wxDateTime got no info about time zone, it defaults to local.

Consider:

Code: Select all

wxDateTime::ToTimezone
wxDateTime::FromTimezone
wxDateTime::Format's parameter "TimeZone tz" means "ToTimezone".
by Ronald
Sun Oct 06, 2019 3:20 am
Forum: C++ Development
Topic: About the parameter TimeZone of wxDateTime::Format
Replies: 1
Views: 315

About the parameter TimeZone of wxDateTime::Format

Code: Select all

wxString wxDateTime::Format  ( const wxString &  format = wxDefaultDateTimeFormat, const TimeZone &  tz = Local)  const 
The doc said nothing about the parameter tz.

wxDateTime contains no info about timezone, and TimeZone is relative, so what does tz relative to?
by Ronald
Sun Oct 06, 2019 2:57 am
Forum: General Forum Issues
Topic: forums very slow
Replies: 3
Views: 2813

Re: forums very slow

doublemax wrote:
Fri Oct 04, 2019 7:19 am
While it seems that the forum is a little slower than usual these days, i don't think anything can be done from this side regarding the speed in China. The traffic probably runs through many "listening" stations.
Hi, today the forum is much faster than before.
by Ronald
Sun Oct 06, 2019 2:52 am
Forum: C++ Development
Topic: Diff of wxDateTime::Now() & wxDateTime::UNow() except precision
Replies: 7
Views: 605

Diff of wxDateTime::Now() & wxDateTime::UNow() except precision

wxDateTime now = wxDateTime::Now(); wxDateTime unow = wxDateTime::UNow(); bool b1 = now == unow; bool b2 = now.GetYear() == unow.GetYear() && now.GetMonth() == unow.GetMonth() && now.GetDay() == unow.GetDay() && now.GetHour() == unow.GetHour() && now.GetMinute() == unow.GetMinute() && now.GetSecond...
by Ronald
Fri Oct 04, 2019 12:38 pm
Forum: C++ Development
Topic: wxDialog default affirm/escape actions not work properly
Replies: 7
Views: 451

Re: wxDialog default affirm/escape actions not work properly

I agree it is unexpected, IMO the dialog should not close at all when no button has an action indication (e.g., blue frame around it in Win10). I suspect it to be a wxWidgets bug: AFAIK wxWidgets do a lot of behind the scenes when <Enter> is pressed. I've filed a bug https://trac.wxwidgets.org/tick...
by Ronald
Fri Oct 04, 2019 11:31 am
Forum: C++ Development
Topic: wxDialog default affirm/escape actions not work properly
Replies: 7
Views: 451

Re: wxDialog default affirm/escape actions not work properly

I am not sure I understand but <Enter> behaving as if the button with input focus was pressed has been the native behaviour on Windows since time immemorial. Run the code, it shows the steps to reproduce the problem. Simply say, no default button and the focus is in the edit, Press Enter = EndDialo...