Thanks, it helps.
Will now implement logic to determine if mouse inside the wxDVC
Search found 104 matches
- Thu Mar 26, 2020 3:45 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
- Thu Mar 26, 2020 12:10 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
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...
- Wed Mar 25, 2020 6:50 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
Re: Scroll doesn't work after focusing custom control
Tried unbind OnMouseMove handler in the dialog - didn't help.
Will check it tomorrow
I expect the same...seems like wxDataViewListCtrl works in incorrect way.As a user, I expect mouse wheel events going to the focused control supporting scrolling (listctrl, textctrl...), not its top-level parent.
Will check it tomorrow
- Wed Mar 25, 2020 4:56 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
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
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
- Wed Mar 25, 2020 4:19 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
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.
Regarding SelectionChange event, yes, parent control handles this event too.
- Wed Mar 25, 2020 3:11 pm
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
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...
- Wed Mar 25, 2020 7:18 am
- Forum: C++ Development
- Topic: Scroll doesn't work after focusing custom control
- Replies: 15
- Views: 1140
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 ...
- Fri Mar 06, 2020 1:25 pm
- Forum: C++ Development
- Topic: Resize window in runtime
- Replies: 5
- Views: 513
Re: Resize window in runtime
Problem was here:
So I calculated the size before creating contenPanel and use correct size in it's constructor.
Thanks for helping.
Code: Select all
auto contentPanel = new wxCustomPanel(m_frameContent, FromDIP(wxSize(GetSize().GetWidth(), GetSize().GetHeight())));
Thanks for helping.
- Fri Mar 06, 2020 10:21 am
- Forum: C++ Development
- Topic: Resize window in runtime
- Replies: 5
- Views: 513
Re: Resize window in runtime
Commented all Fit() calls, but it didn't help
- Fri Mar 06, 2020 9:51 am
- Forum: C++ Development
- Topic: Resize window in runtime
- Replies: 5
- Views: 513
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...
- Tue Dec 03, 2019 1:00 pm
- Forum: C++ Development
- Topic: wxScrolledWindow size changes after wxDialog::Fit() call
- Replies: 0
- Views: 1638
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:...
- Fri Nov 29, 2019 10:00 am
- Forum: C++ Development
- Topic: Allow user to resize wxDialog without border
- Replies: 5
- Views: 550
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...
- Thu Nov 28, 2019 2:55 pm
- Forum: C++ Development
- Topic: ScrollBar background color issue in wxScrolled window
- Replies: 3
- Views: 405
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?
Yes, looks like it is part of scrollbar. Is it a way to change it?
- Thu Nov 28, 2019 2:23 pm
- Forum: C++ Development
- Topic: ScrollBar background color issue in wxScrolled window
- Replies: 3
- Views: 405
ScrollBar background color issue in wxScrolled window
Here is screenshot from wxWidgets 3.1.3 samples (scroll.cpp)
Is there a way to remove this white line?
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?
- Thu Nov 28, 2019 2:14 pm
- Forum: C++ Development
- Topic: Allow user to resize wxDialog without border
- Replies: 5
- Views: 550
Re: Allow user to resize wxDialog without border
Could you please describe common algorithm how to implement it by myself?