Can not SetBackgroundcolour in a wxTextCtrl

I tried on my work machine that
has the same os. And it works there!!

Anybody have an idea what I need to do to make it work at home aswell?

The output of 'rpm -qa | grep wx | sort'

work:

python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.1.2-70
wxGTK-gl-2.4.1.2-70
wxPythonGTK-devel-2.4.1.2-1

home:
python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.2-1
wxGTK-devel-2.4.2-1
wxGTK-gl-2.4.1.2-70

Same python version 2.3+

Best regards,

Toni

···

-----Original Message-----
From: Jean Brouwers [mailto:JBrouwers@ProphICy.com]
Sent: Monday, April 12, 2004 8:22 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Can not SetBackgroundcolour in a
wxTextCtrl

The background is green on wxPython 2.4.1.2 (!) with
Python 2.3.2 on RedHat 8.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

James Carroll wrote:

I tried this on Xandros 2 w/ wxWidgets 2.4.2
and on windows xp as well, and got the green background on both
platforms.
-Jim

-----Original Message-----
From: Toni Brkic [mailto:Toni.Brkic@switchcore.com]
Sent: Monday, April 12, 2004 1:21 PM
To: wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] Can not SetBackgroundcolour in a wxTextCtrl

Hi,

I cant manage to set the background colour in wxTextCtrl.
I have made the smallest app possible that shows my problem.
If you run the code the text_ctrl is still white even
though I have done SetBackgroundColour on the text ctrl.

I have also tried with Refresh after setting the background.

Does anybody have an idea. I am quite sure it works, since
I've seen wxPython apps that does it.

I am using wxPython 2.4.2.4 on Linux.

Best regards,

Toni

----------------Code------------------

#!/usr/bin/env python
# generated by wxGlade 0.3.2 on Mon Apr 12 17:37:26 2004

import wx

class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, None, -1, "")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("frame_1")
        self.text_ctrl_2.SetBackgroundColour(wx.Colour(48, 252, 104))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_8 = wx.BoxSizer(wx.VERTICAL)
        sizer_8.Add(self.text_ctrl_2, 0, 0, 0)
        self.SetAutoLayout(1)
        self.SetSizer(sizer_8)
        sizer_8.Fit(self)
        sizer_8.SetSizeHints(self)
        self.Layout()
        # end wxGlade

class MyApp(wx.App):
    def OnInit(self):
        self.InitFrame()
        self.InitEverythingElse()
        return True

    def InitFrame(self):
        self.frame = MyFrame(None)

    def InitEverythingElse(self):
        self.frame.Show(1)
        self.SetTopWindow(self.frame)

def main():
    app = MyApp(0)
    app.MainLoop()

if __name__ == '__main__':
    main()

---------------End Code----------------

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I'd suggest rebuild wxPython, entirely, for GTK2.
See the README.1st.txt file in wxPythonSrc-2.4.1.2
and follow the instructions, verbatim.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

Toni Brkic wrote:

···

I tried on my work machine that
has the same os. And it works there!!

Anybody have an idea what I need to do to make it work at home aswell?

The output of 'rpm -qa | grep wx | sort'

work:

python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.1.2-70
wxGTK-gl-2.4.1.2-70
wxPythonGTK-devel-2.4.1.2-1

home:
python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.2-1
wxGTK-devel-2.4.2-1
wxGTK-gl-2.4.1.2-70

Same python version 2.3+

Best regards,

Toni

-----Original Message-----
From: Jean Brouwers [mailto:JBrouwers@ProphICy.com]
Sent: Monday, April 12, 2004 8:22 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Can not SetBackgroundcolour in a
wxTextCtrl

The background is green on wxPython 2.4.1.2 (!) with
Python 2.3.2 on RedHat 8.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

James Carroll wrote:

I tried this on Xandros 2 w/ wxWidgets 2.4.2 and on windows xp as well, and got the green background on both
platforms.
-Jim

-----Original Message-----
From: Toni Brkic [mailto:Toni.Brkic@switchcore.com] Sent: Monday, April 12, 2004 1:21 PM
To: wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] Can not SetBackgroundcolour in a wxTextCtrl

Hi,

I cant manage to set the background colour in wxTextCtrl.
I have made the smallest app possible that shows my problem.
If you run the code the text_ctrl is still white even
though I have done SetBackgroundColour on the text ctrl.

I have also tried with Refresh after setting the background.

Does anybody have an idea. I am quite sure it works, since
I've seen wxPython apps that does it.

I am using wxPython 2.4.2.4 on Linux.

Best regards,

Toni

----------------Code------------------

#!/usr/bin/env python
# generated by wxGlade 0.3.2 on Mon Apr 12 17:37:26 2004

import wx

class MyFrame(wx.Frame):
   def __init__(self, *args, **kwds):
       # begin wxGlade: MyFrame.__init__
       kwds["style"] = wx.DEFAULT_FRAME_STYLE
       wx.Frame.__init__(self, None, -1, "")
       self.text_ctrl_2 = wx.TextCtrl(self, -1, "")

       self.__set_properties()
       self.__do_layout()
       # end wxGlade

   def __set_properties(self):
       # begin wxGlade: MyFrame.__set_properties
       self.SetTitle("frame_1")
       self.text_ctrl_2.SetBackgroundColour(wx.Colour(48, 252, 104))
       # end wxGlade

   def __do_layout(self):
       # begin wxGlade: MyFrame.__do_layout
       sizer_8 = wx.BoxSizer(wx.VERTICAL)
       sizer_8.Add(self.text_ctrl_2, 0, 0, 0)
       self.SetAutoLayout(1)
       self.SetSizer(sizer_8)
       sizer_8.Fit(self)
       sizer_8.SetSizeHints(self)
       self.Layout()
       # end wxGlade

class MyApp(wx.App):
   def OnInit(self):
       self.InitFrame()
       self.InitEverythingElse()
       return True

   def InitFrame(self):
       self.frame = MyFrame(None)

   def InitEverythingElse(self):
       self.frame.Show(1)
       self.SetTopWindow(self.frame)

def main():
   app = MyApp(0)
   app.MainLoop()

if __name__ == '__main__':
   main()

---------------End Code----------------

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

When I came to work today I noticed that when I run on my
machine natively the background is white!!! But I see it flash
green for a short moment when I start the program.

So I have:

It works if I do:
From home --> Citrix --> Work computer

Directly on my home computer or work computer it doesnt
work only flashes green very quick.

Any ideas how to fix, now I dont think it has todo
with the wxGTK or wxPython.

/Toni

Jean Brouwers wrote:

···

I'd suggest rebuild wxPython, entirely, for GTK2.
See the README.1st.txt file in wxPythonSrc-2.4.1.2
and follow the instructions, verbatim.

/Jean Brouwers
ProphICy Semiconductor, Inc.

Toni Brkic wrote:

I tried on my work machine that
has the same os. And it works there!!

Anybody have an idea what I need to do to make it work at home aswell?

The output of 'rpm -qa | grep wx | sort'

work:

python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.1.2-70
wxGTK-gl-2.4.1.2-70
wxPythonGTK-devel-2.4.1.2-1

home:
python-wxGTK-2.4.1.2-70
python-wxGTK-doc-2.4.1.2-25
python-wxGTK-examples-2.4.1.2-25
wxGTK-2.4.2-1
wxGTK-devel-2.4.2-1
wxGTK-gl-2.4.1.2-70

Same python version 2.3+

Best regards,

Toni

-----Original Message-----
From: Jean Brouwers [mailto:JBrouwers@ProphICy.com]
Sent: Monday, April 12, 2004 8:22 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Can not SetBackgroundcolour in a
wxTextCtrl

The background is green on wxPython 2.4.1.2 (!) with
Python 2.3.2 on RedHat 8.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

James Carroll wrote:

I tried this on Xandros 2 w/ wxWidgets 2.4.2 and on windows xp as well, and got the green background on both
platforms.
-Jim

-----Original Message-----
From: Toni Brkic [mailto:Toni.Brkic@switchcore.com] Sent: Monday, April 12, 2004 1:21 PM
To: wxPython-users@lists.wxwidgets.org
Subject: [wxPython-users] Can not SetBackgroundcolour in a wxTextCtrl
Hi,

I cant manage to set the background colour in wxTextCtrl.
I have made the smallest app possible that shows my problem.
If you run the code the text_ctrl is still white even
though I have done SetBackgroundColour on the text ctrl.

I have also tried with Refresh after setting the background.

Does anybody have an idea. I am quite sure it works, since
I've seen wxPython apps that does it.

I am using wxPython 2.4.2.4 on Linux.

Best regards,

Toni

----------------Code------------------

#!/usr/bin/env python
# generated by wxGlade 0.3.2 on Mon Apr 12 17:37:26 2004

import wx

class MyFrame(wx.Frame):
   def __init__(self, *args, **kwds):
       # begin wxGlade: MyFrame.__init__
       kwds["style"] = wx.DEFAULT_FRAME_STYLE
       wx.Frame.__init__(self, None, -1, "")
       self.text_ctrl_2 = wx.TextCtrl(self, -1, "")

       self.__set_properties()
       self.__do_layout()
       # end wxGlade

   def __set_properties(self):
       # begin wxGlade: MyFrame.__set_properties
       self.SetTitle("frame_1")
       self.text_ctrl_2.SetBackgroundColour(wx.Colour(48, 252, 104))
       # end wxGlade

   def __do_layout(self):
       # begin wxGlade: MyFrame.__do_layout
       sizer_8 = wx.BoxSizer(wx.VERTICAL)
       sizer_8.Add(self.text_ctrl_2, 0, 0, 0)
       self.SetAutoLayout(1)
       self.SetSizer(sizer_8)
       sizer_8.Fit(self)
       sizer_8.SetSizeHints(self)
       self.Layout()
       # end wxGlade

class MyApp(wx.App):
   def OnInit(self):
       self.InitFrame()
       self.InitEverythingElse()
       return True

   def InitFrame(self):
       self.frame = MyFrame(None)

   def InitEverythingElse(self):
       self.frame.Show(1)
       self.SetTopWindow(self.frame)

def main():
   app = MyApp(0)
   app.MainLoop()

if __name__ == '__main__':
   main()

---------------End Code----------------

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org