Search found 104 matches

by rudolfninja
Thu Mar 26, 2020 3:45 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

Thanks, it helps.
Will now implement logic to determine if mouse inside the wxDVC
by rudolfninja
Thu Mar 26, 2020 12:10 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

Tried to pass mouswheel event to parent control, but didn't help. But may be I'm doing something wrong. wxListViewShares::wxListViewShares(wxWindow* parent, const share_list_t& shares, const std::shared_ptr<ApplicationHelper>& appHelper, const SharesSerializer::used_shares_t& usedShares) : wxDataVie...
by rudolfninja
Wed Mar 25, 2020 6:50 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

Tried unbind OnMouseMove handler in the dialog - didn't help.
As a user, I expect mouse wheel events going to the focused control supporting scrolling (listctrl, textctrl...), not its top-level parent.
I expect the same...seems like wxDataViewListCtrl works in incorrect way.
Will check it tomorrow
by rudolfninja
Wed Mar 25, 2020 4:56 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

By "stop working" I mean that it doesn't respond on mouse wheel action.
I attached parent dialog's files. But actually I don't think the problem somewhere there, because if I focus wxTextCtrl on the same dialog, then everything works ok
by rudolfninja
Wed Mar 25, 2020 4:19 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

PB, nice point about exiting MouseMove handler without skipping the event sometimes. But It is not the reason of the issue, because I tried to comment OnMouseMove binding and it didn't help.
Regarding SelectionChange event, yes, parent control handles this event too.
by rudolfninja
Wed Mar 25, 2020 3:11 pm
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Re: Scroll doesn't work after focusing custom control

wxWidgets 3.1.3, OS - windows, but I believe that on Linux will be the same behavior. I don't think that the problem is in scroll actually, because my custom control just doesn't loose the focus after I clicking outside the control. I also tried handle wxEVT_LEAVE_WINDOW by setting focus on parent w...
by rudolfninja
Wed Mar 25, 2020 7:18 am
Forum: C++ Development
Topic: Scroll doesn't work after focusing custom control
Replies: 15
Views: 842

Scroll doesn't work after focusing custom control

I've got scrollbars on my dialog. And there is custom control inside. When I focus (click inside) custom control, then scroll (inside the dialog) stops working. To make it work again I have to focus some native control (wxTextCtrl). Here is code of my custom control: class wxListViewShares : public ...
by rudolfninja
Fri Mar 06, 2020 1:25 pm
Forum: C++ Development
Topic: Resize window in runtime
Replies: 5
Views: 403

Re: Resize window in runtime

Problem was here:

Code: Select all

auto contentPanel = new wxCustomPanel(m_frameContent, FromDIP(wxSize(GetSize().GetWidth(), GetSize().GetHeight())));
So I calculated the size before creating contenPanel and use correct size in it's constructor.
Thanks for helping.
by rudolfninja
Fri Mar 06, 2020 10:21 am
Forum: C++ Development
Topic: Resize window in runtime
Replies: 5
Views: 403

Re: Resize window in runtime

Commented all Fit() calls, but it didn't help
by rudolfninja
Fri Mar 06, 2020 9:51 am
Forum: C++ Development
Topic: Resize window in runtime
Replies: 5
Views: 403

Resize window in runtime

I need to set window width depending on text's width. I tried SetClientSize and SetSize methods, but window still has the same size: MainWindow::MainWindow(wxWindow* parent, const std::shared_ptr<SharingManager>& sharingManager, const std::shared_ptr<UiAgentMasterBridge>& agentBridge) : wxCustomFram...
by rudolfninja
Tue Dec 03, 2019 1:00 pm
Forum: C++ Development
Topic: wxScrolledWindow size changes after wxDialog::Fit() call
Replies: 0
Views: 1162

wxScrolledWindow size changes after wxDialog::Fit() call

Greetings, I have dialog class (derived from wxDialog) with fixed min size. The dialog class has wxCustomPanel* member (derived from wxPanel) also some collapsible panels are present on dialog. wxCustomPanel* member is used as a template type for wxScrolled<>: wxCustomPanel* wxRTSharesManagerDialog:...
by rudolfninja
Fri Nov 29, 2019 10:00 am
Forum: C++ Development
Topic: Allow user to resize wxDialog without border
Replies: 5
Views: 422

Re: Allow user to resize wxDialog without border

Tried to implement this solution: void wxRTSharesManagerDialog::OnLeftDown(wxMouseEvent& event) { CaptureMouse(); } void wxRTSharesManagerDialog::OnLeftUp(wxMouseEvent& event) { if (HasCapture()) { ReleaseMouse(); } } void wxRTSharesManagerDialog::OnMouseMove(wxMouseEvent& event) { wxPoint pt = even...
by rudolfninja
Thu Nov 28, 2019 2:55 pm
Forum: C++ Development
Topic: ScrollBar background color issue in wxScrolled window
Replies: 3
Views: 313

Re: ScrollBar background color issue in wxScrolled window

In my app the same and the window background isn't white.
Yes, looks like it is part of scrollbar. Is it a way to change it?
by rudolfninja
Thu Nov 28, 2019 2:23 pm
Forum: C++ Development
Topic: ScrollBar background color issue in wxScrolled window
Replies: 3
Views: 313

ScrollBar background color issue in wxScrolled window

Here is screenshot from wxWidgets 3.1.3 samples (scroll.cpp)
scroll.png
scroll.png (19.43 KiB) Viewed 313 times
As it seen from screenshot there is white line between scrollbar and window it bound to. In my app I can see the same problem.
Is there a way to remove this white line?
by rudolfninja
Thu Nov 28, 2019 2:14 pm
Forum: C++ Development
Topic: Allow user to resize wxDialog without border
Replies: 5
Views: 422

Re: Allow user to resize wxDialog without border

Could you please describe common algorithm how to implement it by myself?