Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the SetBackgroundColour method to set the background color of the parent container of the wx.FilePickerCtrl, and then use CSS or other styling techniques to target only the File/Path box within the container and set its background color separately.

For example, if you have a wx.FilePickerCtrl within a wx.Panel, you could use the following code to set the background color of the panel to white:

panel.SetBackgroundColour(wx.WHITE)

Then, you could use CSS or other styling techniques to target the File/Path box within the panel and set its background color to a different color, such as blue:

wx.FilePickerCtrl {
  background-color: blue;
}

Note that the specific CSS syntax may vary depending on your programming language and the way you are rendering the wx.FilePickerCtrl.