Search found 12394 matches

by doublemax
Wed Jul 18, 2018 5:36 pm
Forum: C++ Development
Topic: User sizable panel?
Replies: 8
Views: 47

Re: User sizable panel?

Unless you're building a GUI editor, i just can't think of any situation where it makes sense to resize an individual control. You can of course catch the mouse motion event, check if the mouse is near the edge of a control, change the mouse cursor and if the user clicks, you capture the mouse and r...
by doublemax
Wed Jul 18, 2018 7:50 am
Forum: C++ Development
Topic: wxScrolledWindow - scrollbar thumb position staying at the top always
Replies: 3
Views: 41

Re: wxScrolledWindow - scrollbar thumb position staying at the top always

First try calling Focus() on any of the newly added controls. This should scroll the control into view (i looked into the source code). If you need to calculate the scroll position yourself, you need: GetVirtualSize() - get virtual size of the window GetClientSize() - get size of the visual portion ...
by doublemax
Tue Jul 17, 2018 7:17 pm
Forum: C++ Development
Topic: wxScrolledWindow - scrollbar thumb position staying at the top always
Replies: 3
Views: 41

Re: wxScrolledWindow - scrollbar thumb position staying at the top always

What is it that I am missing here in order to update the scrollbar thumb position? Please help! Which part of the code you posted do you expect to scroll the window to the bottom? You could try to just Focus() one of the newly added controls. I think there is some code in wxWidgets that automatical...
by doublemax
Tue Jul 17, 2018 2:36 pm
Forum: C++ Development
Topic: wxDataViewListCtrl with bitmap column crashes at ~5000 rows
Replies: 3
Views: 37

Re: wxDataViewListCtrl with bitmap column crashes at ~5000 rows

wxBitmap bitmap(empty_xpm); The problem here is that you create a new bitmap from the source data each time. Move that line outside the loop, then the same bitmap data will be shared by all bitmaps and there shouldn't be a GDI handle problem. wxBitmap bitmap(empty_xpm); // Add rows. for (size_t i =...
by doublemax
Tue Jul 17, 2018 2:30 pm
Forum: C++ Development
Topic: wxStaticBitmap help text when mouse hovers
Replies: 5
Views: 44

Re: wxStaticBitmap help text when mouse hovers

I would set a long timeout, then the user can hide the tooltip by clicking outside.
by doublemax
Tue Jul 17, 2018 12:39 pm
Forum: C++ Development
Topic: wxStaticBitmap help text when mouse hovers
Replies: 5
Views: 44

Re: wxStaticBitmap help text when mouse hovers

thanx, the description says "and a native MSW version which can be only used with text controls"? I develop for Windows. I don't think that's true. I'm pretty sure i've used it for other controls already. Make a small test to confirm. Or is this what you meant with "trigger it yourse...
by doublemax
Tue Jul 17, 2018 11:51 am
Forum: C++ Development
Topic: wxStaticBitmap help text when mouse hovers
Replies: 5
Views: 44

Re: wxStaticBitmap help text when mouse hovers

wxRichToolTip is nice, but you have to trigger it yourself. You can't set it up so that it automatically appears like a normal tooltip.
http://docs.wxwidgets.org/trunk/classwx ... l_tip.html
by doublemax
Mon Jul 16, 2018 12:58 pm
Forum: C++ Development
Topic: DrawBitmap() fails on Memory DC
Replies: 4
Views: 48

Re: DrawBitmap() fails on Memory DC

Then i can only guess that the 1 bit depth is the problem. Check the bitmap after loading "Logo.bmp". Is it 1 or 24 bit depth? I believe the problem is either a) that wxMemoryDC doesn't work for 1 bit bitmaps or b) the loaded bitmap is 24 or 32 bit and drawing such a bitmap into a 1bit bit...
by doublemax
Mon Jul 16, 2018 12:22 pm
Forum: C++ Development
Topic: DrawBitmap() fails on Memory DC
Replies: 4
Views: 48

Re: DrawBitmap() fails on Memory DC

Code: Select all

wxBitmap *pBitmap = new wxBitmap(m_Label.nWidth, m_Label.nHeight, 1);
Did you confirm that nWidth and nHeight are > 0?
Check the return value of pBitmap->IsOk().
by doublemax
Sun Jul 15, 2018 7:01 pm
Forum: C++ Development
Topic: wxDisplay
Replies: 1
Views: 40

Re: wxDisplay

wxDisplay should be available on all major platforms since wx 2.8.x

Which platform and wxWidgets version are you using? Can you build and run the "display" sample that comes with wxWidgets?
by doublemax
Sun Jul 15, 2018 11:57 am
Forum: Platform Related Issues
Topic: Infinite backtrace of wxapp_poll_fun() while sending on socket from a thread to another
Replies: 4
Views: 115

Re: Infinite backtrace of wxapp_poll_fun() while sending on socket from a thread to another

BTW: The function in question (wxapp_poll_func) does not exists any more in the GTK2 version of wx3.x.
by doublemax
Sun Jul 15, 2018 9:52 am
Forum: C++ Development
Topic: Drawing pixel by pixel
Replies: 2
Views: 47

Re: Drawing pixel by pixel

Ignore the pixelsize, generate a wxImage at original resolution, use wxImage::SetRGB() to set indivudual pixels. For drawing, convert it to wxBitmap and use wxDC::SetUserscale() before drawing to scale it to the desired size. Alternatively, use a wxBitmap instead of wxImage and use raw bitmap access...
by doublemax
Sat Jul 14, 2018 8:37 am
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do? [SOLVED]
Replies: 2
Views: 53

Re: I want to move a wxStaticBitmap from frame to another Dialog, how to do? [SOLVED]

It's not totally clear to me what you want to do. If you just want to display the same bitmap in another window, i would suggest to just create a new wxStaticBitmap based on the same bitmap. Everything else would be unnecessarily complicated.
by doublemax
Fri Jul 13, 2018 10:18 pm
Forum: C++ Development
Topic: wxGrid scrolling refresh problem with merged cells [SOLVED]
Replies: 8
Views: 120

Re: wxGrid scrolling refresh problem with merged cells [SOLVED]

Honestly, i have no idea how these two things could be related.
by doublemax
Fri Jul 13, 2018 6:53 pm
Forum: C++ Development
Topic: wxGrid scrolling refresh problem with merged cells [SOLVED]
Replies: 8
Views: 120

Re: wxGrid scrolling refresh problem with merged cells [SOLVED]

Could you elaborate a bit, please?
No, as it was only a wild guess.

Is it really a display error or just a redraw issue? I.e. when you have the "bad" case and force a redraw, e.g. by moving a window from another application over the grid, does it fix itself or does it stay wrong?

Go to advanced search