Search found 86 matches

by papillon68
Wed Apr 15, 2020 7:41 pm
Forum: C++ Development
Topic: wxAuiManager: setting pane sizes
Replies: 7
Views: 337

Re: wxAuiManager: setting pane sizes

Thanks for all the suggestions, really appreciated. I ended up using the workaround mentioned by Kvazi1r and it did the job!
by papillon68
Tue Apr 14, 2020 4:22 pm
Forum: C++ Development
Topic: wxAuiManager: setting pane sizes
Replies: 7
Views: 337

Re: wxAuiManager: setting pane sizes

ONEEYEMAN wrote:
Tue Apr 14, 2020 2:45 pm
Hi,
Also, the best way of finding something is thru the documentation and the official wxWidgets samples (auidemo in this case).

Thank you.
Yes and I actually looked at the sample before but couldn't find any relevant code to do that.
by papillon68
Tue Apr 14, 2020 4:21 pm
Forum: C++ Development
Topic: wxAuiManager: setting pane sizes
Replies: 7
Views: 337

Re: wxAuiManager: setting pane sizes

A non trivial managed pane is usually derived from wxPanel. You can define a derived class from wxPanel that has several children, which may be themselves classes derived from wxPanel, and control the size and position of the child panels with a sizer in the parent panel. So, define a pane that con...
by papillon68
Fri Apr 10, 2020 9:16 pm
Forum: C++ Development
Topic: wxAuiManager: setting pane sizes
Replies: 7
Views: 337

wxAuiManager: setting pane sizes

I have two vertical panes that equally split the available height size. I'd like instead to have the first pane occupy 25% of the space, and the second the remaining 75%. Based on some suggestions found on Google, I've tried setting the maximum size: Addpane().MaxSize(x,y) and also using the wxAuiPa...
by papillon68
Sat Dec 28, 2019 10:19 am
Forum: C++ Development
Topic: wxAuiManager onMotion/onDrag event?
Replies: 4
Views: 334

Re: wxAuiManager onMotion/onDrag event?

Thanks, I see what you mean now. It works partially, meaning that it returns true only when the pane is detached and dragged around. If you stop dragging, and drag it again, GetCapture() won't track it anymore. Odd, but anyway this is still useful. To fix the issue I found an alternative, I'm giving...
by papillon68
Fri Dec 27, 2019 11:26 pm
Forum: C++ Development
Topic: wxAuiManager onMotion/onDrag event?
Replies: 4
Views: 334

Re: wxAuiManager onMotion/onDrag event?

Clever! I suppose something like this?

Code: Select all

void MyGLCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
{
	wxWindow *ID = GetCapture();	
	if (ID == this) return;
	...
by papillon68
Fri Dec 27, 2019 9:03 pm
Forum: C++ Development
Topic: wxAuiManager onMotion/onDrag event?
Replies: 4
Views: 334

wxAuiManager onMotion/onDrag event?

I get openGL errors every time I drag and drop some wxAui panes, so I wanted to catch the drag event, stop openGL drawing and restore it once the pane is dropped. Only that it doesn't seem there are any events triggered when a pane is moved. Oddly there are only for wxAuiNotebook, but not for the wx...
by papillon68
Fri Dec 27, 2019 5:59 pm
Forum: C++ Development
Topic: wxAuiDefaultTabArt customization
Replies: 2
Views: 195

Re: wxAuiDefaultTabArt customization

Thanks for the reply, doublemax. No the function wasn't called and so I ended up subclassing DrawTab like this: void MyAuiTabArt::DrawTab(wxDC &dc, wxWindow *wnd, const wxAuiNotebookPage &pane, const wxRect &inRect, int closeButtonState, wxRect *outTabRect, wxRect *outButtonRect, int *xExtent) { wxS...
by papillon68
Fri Dec 27, 2019 4:18 pm
Forum: C++ Development
Topic: wxAuiDefaultTabArt customization
Replies: 2
Views: 195

wxAuiDefaultTabArt customization

I'm trying to customize a wxAuiNotebook but it seems no changes are successful. I've derived a new class for the wxAuiDefaultTabArt: class MyAuiTabArt : public wxAuiDefaultTabArt { public: MyAuiTabArt() {} virtual ~MyAuiTabArt() {} wxAuiDefaultTabArt *Clone() { return new MyAuiTabArt(); } void DrawB...
by papillon68
Fri Dec 20, 2019 11:07 pm
Forum: C++ Development
Topic: wxDataViewCtrl issues
Replies: 1
Views: 395

wxDataViewCtrl issues

Hello, I have a couple of issues using wxDataViewCtrl: 1) checkbox toggle columns don't work at all: crownLayersTreeCtrl->AppendToggleColumn("icon", 0, wxDATAVIEW_CELL_EDITABLE, 30, wxALIGN_LEFT); 2) can't visualize bitmaps in a bitmap column: crownLayersTreeCtrl->AppendBitmapColumn("icon", 1, wxDAT...
by papillon68
Tue Dec 03, 2019 11:11 pm
Forum: C++ Development
Topic: wxSlider: disabling mouse wheel
Replies: 3
Views: 274

Re: wxSlider: disabling mouse wheel

I've "fixed" it using a boolean to intercept the wheel event, and when it's true I restore the slider value to it's precedent one. It's kind of a hack but it does what I need.
by papillon68
Tue Dec 03, 2019 3:30 pm
Forum: C++ Development
Topic: wxSlider: disabling mouse wheel
Replies: 3
Views: 274

Re: wxSlider: disabling mouse wheel

Hi, I am on Windows 10/ wxWidgets 3.13 Yes I did connect the mouse wheel event to an empty function, without success. Here below is code showing the connections: Connect(CLOROFILLAWIDGET_SLIDERCONTROLLER, wxEVT_SCROLL_CHANGED, wxScrollEventHandler(ClorofillaSlider::OnRelease)); // connect scroll eve...
by papillon68
Mon Dec 02, 2019 11:35 pm
Forum: C++ Development
Topic: wxSlider: disabling mouse wheel
Replies: 3
Views: 274

wxSlider: disabling mouse wheel

Hello, I searched information around but couldn't find if it's possible at all to deny wxSlider changes using the mouse wheel. Thanks
by papillon68
Fri Oct 04, 2019 5:22 pm
Forum: C++ Development
Topic: wxGLCanvas: weird update issue
Replies: 6
Views: 556

Re: wxGLCanvas: weird update issue

Thanks Manolo, you gave me too lot of good advises. Especially not to forget to set the opengl context as current in the main thread (which I missed). The application works pretty well so far and it's quite robust performance-wise, I really love the wx libraries.
by papillon68
Wed Oct 02, 2019 9:27 pm
Forum: C++ Development
Topic: wxGLCanvas: weird update issue
Replies: 6
Views: 556

Re: wxGLCanvas: weird update issue

Thanks, I really appreciate the help and hints. I think I found and solved the issue. The rendering loop is not continuous, i.e. it's updated manually. It seems that once the multithreading code has run, even calling Refresh(0) or Update() won't actually have any effect on wxGLCanvas. So my solution...