Search found 92 matches

by gpu
Tue Aug 26, 2014 10:55 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

I use wxScrollWindow<wxPanel> as the main frame, and it's not transparent or semi-transparent... the small myPanel I use the bitmap way to make it semi-transparent, but (1) eg, if i use dc draw sth on the wxScollWindow, expect the 1st I constuct on the thing I drawn on wxScrollWindow it it seems sem...
by gpu
Tue Aug 26, 2014 9:54 am
Forum: C++ Development
Topic: can ScrolledWindow resize with mouseWheel?
Replies: 17
Views: 3052

Re: can ScrolledWindow resize with mouseWheel?

I resize with myPanel(by the way get the original size in the constructor, and then multiply the new scale with it ), BUT the promble is that the children controls(all kinds of controls, eg button, combo, label, etc) which I didn't inheritie from wxButton, wx****, so I can't get the original size in...
by gpu
Tue Aug 26, 2014 7:54 am
Forum: C++ Development
Topic: about DND, and mouseMove
Replies: 3
Views: 1069

about DND, and mouseMove

hi, here is my problem, i have a custom myPanel. And I want to drag from one myPanel and then drop on another myPanel. Should I inheritite myPanle from wxDropTarget. And while the dragging, I still want to do sth else(eg, draw a line ended with the mouse position in the MouseMotion event), so the Do...
by gpu
Sat Aug 23, 2014 8:07 am
Forum: C++ Development
Topic: is there good way to pick color anywhere on the screen?
Replies: 3
Views: 1002

Re: is there good way to pick color anywhere on the screen?

is there EVT_LEFT_DOWN for wxFrame? what i want to do is Click the mouse left button to get the Pixel where i click, the best is I can response to the click event anywhere on the screen(including the area outside current wx Application); And if it's impossible, I hope the area includes the whole wx ...
by gpu
Sat Aug 23, 2014 5:53 am
Forum: C++ Development
Topic: No EVT_LEFT_DOWN for wxFrame?
Replies: 1
Views: 720

No EVT_LEFT_DOWN for wxFrame?

is there EVT_LEFT_DOWN for wxFrame? what i want to do is Click the mouse left button to get the Pixel where i click, the best is I can response to the click event anywhere on the screen(including the area outside current wx Application); And if it's impossible, I hope the area includes the whole wx ...
by gpu
Sat Aug 23, 2014 2:31 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

doublemax wrote:
Displaying native controls semi-transparently over custom background is practically impossible.
not semi-transparent...I saw it override the SetTransparent kinda of API from wxWindow...but it doesn't work like wxPanel
by gpu
Fri Aug 22, 2014 7:56 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

I solved there problem use SetWindowStyle(wxTRANSPARENT_WINDOW) for both the Big and Small panel. And what about another platform, can I directly use SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) on MAC/LINUX instead ? Then the problem left is how to make the various controls background "transparent".....
by gpu
Fri Aug 22, 2014 7:24 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

aaaaaa

aaaaaa
by gpu
Fri Aug 22, 2014 7:12 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

doublemax wrote:Or you have to manipulate the alpha-values of the bitmap directly before drawing it.
Or this way is easier and more available? But what API should I use to do this? wxGraphicsContext::BeginLayer (which u said yesterday that it doesn't work on Windows)? or some other ways to do it ?
by gpu
Fri Aug 22, 2014 7:09 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

So there is no way to get the semi-transparent on Windows? whether it is wxPanle or wxWindow? It's possible. But either you need to create a bitmap with fixed transparency in PhotoShop or similar. Or you have to manipulate the alpha-values of the bitmap directly before drawing it. I tried, but just...
by gpu
Fri Aug 22, 2014 2:07 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

And I also tried SetBackgroundColor(wxColour(r,g,b,a))...It also doesn't work.
by gpu
Fri Aug 22, 2014 2:03 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

Manolo wrote:Does this helps?
wxWindow::SetTransparent(wxByte alpha)
http://docs.wxwidgets.org/trunk/classwx ... 0f45a0656f
I'm afraid it doesn't work on Windows, and other platform I didn't try...cause I tried CanSetTransparent(), but it returns false...
by gpu
Thu Aug 21, 2014 11:07 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

There are methods like SetBackground(...) and GetBackgroundBitmap(...), but they're not officially documented and AFAICS they're only used in wxUniversal. There is wxCustomBackgroundWindow though, but i remember a post from someone else saying that it doesn't work correctly with a wxScrolledWindow ...
by gpu
Thu Aug 21, 2014 10:19 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

Sorry, i wasn't clear enough. There is no wxWindow method for this. This was assuming that you have a wxBitmap somewhere that you're using to draw the background. How you access that bitmap is up to you. I'am alittle puzzled:) I mean that there is no default API to get/set bitmap for wxPanel, but t...
by gpu
Thu Aug 21, 2014 8:48 am
Forum: C++ Development
Topic: How make wxPanel transparent on Windows and Linux?
Replies: 40
Views: 9524

Re: How make wxPanel transparent on Windows and Linux?

Ok, now i see the "bigger picture". Together with your question about zooming, you'll definitely need a 100% custom control. The main question is whether the individual panels are wxWidgets controls, too or if everything is managed by yourself. The latter case is guaranteed to work as it gives you ...