Hello,
I don't think this is possible but i thought i would ask the wiser people.
I have a bmp image which shows a gradient effect of light at the top down to a slightly darker shade at the bottom.
I want to use it as a background to a window and then put my listboxes and listctrls on top of it. ideally each list control will use the same gradient as its background. It can have quite a nice subtle effect when done properly.
Here is the code
I don't have a site to upload the graphic too but it is a 300 by 300 bmp.
If someone wants to upload it a simple email will get it sent to you.
So far i have the image being displayed but it doesn't stretch with the window.
In my main program i can set the panel and control backgrounds to custom colours but the effect is not as nice as the gradient.
Any suggestions appreciated.
Glenn
I don't think this is possible but i thought i would ask the wiser people.
I have a bmp image which shows a gradient effect of light at the top down to a slightly darker shade at the bottom.
I want to use it as a background to a window and then put my listboxes and listctrls on top of it. ideally each list control will use the same gradient as its background. It can have quite a nice subtle effect when done properly.
Here is the code
' ' BlitzMax code generated with wxCodeGen v1.06 : 04 Aug 2008 23:19:04 ' ' ' PLEASE DO "NOT" EDIT THIS FILE! ' SuperStrict Framework wx.wxApp Import wx.wxFrame Import wx.wxPanel Import wx.wxStaticBitmap Import wx.wxWindow New MyApp.run() Type MyApp Extends wxApp Field frame:MyFrame2Base Method OnInit:Int() ?macos ' make the default Mac font for controls not so big wxSystemOptions.SetOption(wxWINDOW_DEFAULT_VARIANT, wxWINDOW_VARIANT_SMALL) ? ' needed so my graphics show up wxInitAllImageHandlers() ' for Mac/Win32 (it is default on Linux) wxImage.AddHandler( New wxXPMHandler ) ' create the frame Local frame:MyFrame2Base = MyFrame2Base(New MyFrame2Base.Create(, , "C2D TaskList Manager")) ' frames are created hidden. You need to manually show it. frame.show() ' make sure it is brought to the front SetTopWindow(frame) Return True End Method End Type Type MyFrame2Base Extends wxFrame Field m_panel2:wxPanel Field m_bitmap3:wxStaticBitmap Method Create:MyFrame2Base(parent:wxWindow = Null,id:Int = wxID_ANY, title:String = "", x:Int = -1, y:Int = -1, w:Int = 624, h:Int = 513, style:Int = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL) Return MyFrame2Base(Super.Create(parent, id, title, x, y, w, h, style)) End Method Method OnInit() Local bSizer14:wxBoxSizer bSizer14 = New wxBoxSizer.Create(wxVERTICAL) m_panel2 = New wxPanel.Create(Self, wxID_ANY,,,,, wxTAB_TRAVERSAL) Local bSizer15:wxBoxSizer bSizer15 = New wxBoxSizer.Create(wxVERTICAL) m_bitmap3 = New wxStaticBitmap.Create(m_panel2, wxID_ANY, wxBitmap.CreateFromFile("C:/Images/C2D_Gradient_LightUp.bmp", wxBITMAP_TYPE_ANY)) bSizer15.Add(m_bitmap3, 1, wxALL, 5) m_panel2.SetSizer(bSizer15) m_panel2.Layout() bSizer15.Fit(m_panel2) bSizer14.Add(m_panel2, 1, wxEXPAND | wxALL, 5) SetSizer(bSizer14) Layout() End Method End Type
I don't have a site to upload the graphic too but it is a 300 by 300 bmp.
If someone wants to upload it a simple email will get it sent to you.
So far i have the image being displayed but it doesn't stretch with the window.
In my main program i can set the panel and control backgrounds to custom colours but the effect is not as nice as the gradient.
Any suggestions appreciated.
Glenn