Search found 162 matches

by Ronald
Sat Sep 14, 2019 11:29 am
Forum: C++ Development
Topic: wxPropertyGrid::ChangePropertyValue not work
Replies: 4
Views: 525

Re: wxPropertyGrid::ChangePropertyValue not work

This looks like a bug indeed. It works if you use CallAfter for the inner method call: if (s.ToDouble(&n)) { n *= 2; CallAfter([=] { bool ok = ChangePropertyValue(_pProp_2, n ); // This line will be executed and return true, but UI doesn't change. // wxPropertyGrid::SetPropertyValue works // wxPGPr...
by Ronald
Sat Sep 14, 2019 11:23 am
Forum: General Development
Topic: can not create ticket on trac.wxwidgets.org
Replies: 4
Views: 2248

Re: can not create ticket on trac.wxwidgets.org

1) The area below the two buttons, where it says 'ticket not yet created', actually is the preview. (Yes, that's confusing: afaict there's no need for the 'Preview' button too.) So, when it says that the ticket is not yet created, that's correct. It's not created until you click the 'Create ticket'...
by Ronald
Sat Sep 14, 2019 8:33 am
Forum: General Development
Topic: can not create ticket on trac.wxwidgets.org
Replies: 4
Views: 2248

can not create ticket on trac.wxwidgets.org

Can you?
Capture.PNG
Capture.PNG (14.24 KiB) Viewed 2245 times
by Ronald
Sat Sep 14, 2019 6:51 am
Forum: C++ Development
Topic: autocompletion for wxTextCtrl to match any part of input
Replies: 1
Views: 232

autocompletion for wxTextCtrl to match any part of input

Q: wxTextCompleterSimple only supports to match the leading part of input, how to make autocompletion to match any part of the input? Below is the code in the doc of wxTextCompleterSimple ( simplified) class MyTextCompleter : public wxTextCompleterSimple { public: virtual void GetCompletions(const w...
by Ronald
Fri Sep 13, 2019 12:31 pm
Forum: C++ Development
Topic: wxPropertyGrid::ChangePropertyValue not work
Replies: 4
Views: 525

wxPropertyGrid::ChangePropertyValue not work

demo in attachment It's a VS2019 solution, easy to migrate. ShowBug.VS2019.7z main code #include "pch.h" #include "BuggyPropGrid.h" BEGIN_EVENT_TABLE(BuggyPropGrid, wxPropertyGrid) EVT_PG_CHANGED(wxID_ANY, BuggyPropGrid::OnPropChanged) EVT_PG_DOUBLE_CLICK(wxID_ANY, BuggyPropGrid::OnPGDClick) END_EVE...
by Ronald
Sat Sep 07, 2019 7:22 am
Forum: C++ Development
Topic: wider child control makes wxScrolledWindow auto scroll
Replies: 7
Views: 572

Re: wider child control makes wxScrolledWindow auto scroll

It's always possible that a recent commit breaks something, but it's rare and if it happens, it's usually fixed quickly. If HEAD commit is easy to use, it'll be easy to contribute to. The only problem in my case (Visual Studio 2019) is that when file(s) added/removed the solution needs to be regene...
by Ronald
Fri Sep 06, 2019 7:45 am
Forum: C++ Development
Topic: wider child control makes wxScrolledWindow auto scroll
Replies: 7
Views: 572

Re: wider child control makes wxScrolledWindow auto scroll

doublemax wrote:
Fri Sep 06, 2019 7:17 am
I would just get the latest master branch.

Otherwise you could also try to override
void HandleOnChildFocus(wxChildFocusEvent& event);
If HEAD commit works without unacceptable bug, I prefer it.

Thanks
by Ronald
Fri Sep 06, 2019 3:25 am
Forum: C++ Development
Topic: wider child control makes wxScrolledWindow auto scroll
Replies: 7
Views: 572

Re: wider child control makes wxScrolledWindow auto scroll

https://docs.wxwidgets.org/trunk/classwx_scrolled.html#aa52533d3486dafec14afe3742fee383b The doc says it is supported since 3.1.3 The lib directory contains some files like "wxbase313u_net_vc_x64.dll", but no ShouldScrollToChildOnFocus for override. I've checked the git repo, the newest version v3....
by Ronald
Fri Sep 06, 2019 3:17 am
Forum: C++ Development
Topic: Where to delete the object for modaless dialog
Replies: 12
Views: 804

Re: Where to delete the object for modaless dialog

Hi, The customization crawler dialog should probably be done as a modal dialog. Now when the crawler setting is satisfactory, user presses OK, wxProgressDialog starts (probnably wxGenericProgressDialog) with some customizatrions - such as number of tasks completed/succeeded/failed, etc. I've looked...
by Ronald
Thu Sep 05, 2019 4:15 pm
Forum: C++ Development
Topic: wider child control makes wxScrolledWindow auto scroll
Replies: 7
Views: 572

wider child control makes wxScrolledWindow auto scroll

1. wxGrid in wxScrolledWindow
2. wxGrid is wider than wxScrolledWindow
3. when clicking on a cell of wxGrid, wxScrolledWindow auto scrolled, to show the ending part of wxGrid

How to make wxScrolledWindow not auto scroll in the case?
by Ronald
Thu Sep 05, 2019 4:06 pm
Forum: C++ Development
Topic: Where to delete the object for modaless dialog
Replies: 12
Views: 804

Re: Where to delete the object for modaless dialog

doublemax wrote:
Thu Sep 05, 2019 3:41 pm
delete this in OnClose crashes the program
If you really want the dialog to destroy itself (i still think it's wrong), then calling Destroy() should probably work.
I think so, now I used wxNotebook to contain a page for updating.
Thanks
by Ronald
Thu Sep 05, 2019 4:02 pm
Forum: C++ Development
Topic: Where to delete the object for modaless dialog
Replies: 12
Views: 804

Re: Where to delete the object for modaless dialog

Hi, So the scenario you are looking for is this: 1. You have a main top-level wxFrame with the button. 2. When this button is clicked, you start the web crawler in a thread and at the same time display the dialog. 3. When the crawler is done you dismiss the dialog and display the data acquired in t...
by Ronald
Thu Sep 05, 2019 2:59 pm
Forum: C++ Development
Topic: Where to delete the object for modaless dialog
Replies: 12
Views: 804

Re: Where to delete the object for modaless dialog

Which function? Are you creating a thread behind this dialog? a button click event handler What is the exact scenario? crawl data from web, needs a long time. As doublemaxc pointed out - it is better to use wxDialog for modality and wxFrame/wxPanel for modeless things. But in any case - dialogs are...
by Ronald
Thu Sep 05, 2019 2:55 pm
Forum: C++ Development
Topic: Where to delete the object for modaless dialog
Replies: 12
Views: 804

Re: Where to delete the object for modaless dialog

Handle the wxEVT_CLOSE event. delete this in OnClose crashes the program However, if you need a modal window, use wxDialog. For non-modal, use wxFrame. Why do you need a non-modal dialog? For updating data for a long time. I should use wxFrame. Additionally, a wxDialog should not destroy itself as ...