Hi ,
I try C++ in wxWidgets Panel Set Background Color but not get result .
SetBackgroundColour(wxColour(77,77,77));
using function above but not net resulte.
C++ wxWidgets panel set Background coloru
Re: C++ wxWidgets panel set Background coloru
Can you show the whole code in context? Maybe you're setting the background color for the wxFrame which is completely covered by a wxPanel?
Use the source, Luke!
Re: C++ wxWidgets panel set Background coloru
Hi doublemax thank for replay i have attach image so you get batter idea about
i hope you will be understand my problem and also mark area to change background .
i hope you will be understand my problem and also mark area to change background .
Last edited by harshdeep on Mon Jul 24, 2017 8:12 am, edited 1 time in total.
Re: C++ wxWidgets panel set Background coloru
And i don't see any image and it would be better if you posted code as text.
Use the source, Luke!
-
- Filthy Rich wx Solver
- Posts: 235
- Joined: Fri Sep 14, 2012 8:26 am
- Location: Kontich, Belgium
- Contact:
Re: C++ wxWidgets panel set Background coloru
Hi Harshdeep,
Like Doublemax said, you need to be sure your using the method on the right object. For that you first need to get the pointer to your wxPanel, and then use the method SetBackgroundColour.
Regards,
Nunki
Like Doublemax said, you need to be sure your using the method on the right object. For that you first need to get the pointer to your wxPanel, and then use the method SetBackgroundColour.
Code: Select all
wxPanel *hPnl;
hPnl = XRCCTRL(*this, "FIMG_PANEL",wxPanel);
hPnl->SetBackgroundColour(wxColour(77,77,77));
hPnl->Refresh();
.....
Nunki