repaint function in wxPython

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agsupriya86
    New Member
    • Mar 2007
    • 34

    repaint function in wxPython

    Im setting an image over a panel everytime a button is clicked but that image takes some time to set..that means i need to repaint it..do i have a function for this purpose in wxglade??

    Any help??..its urgent!
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by agsupriya86
    Im setting an image over a panel everytime a button is clicked but that image takes some time to set..that means i need to repaint it..do i have a function for this purpose in wxglade??

    Any help??..its urgent!
    Let's start by getting you terminology straightened out a bit.
    wxGlade is you GUI generator. While it's nice to know that you are using that to generate you GUI code, it's not relevant to your question.

    wxPython is you GUI Toolkit. That's what is relevant.

    To answer your question:
    You may want to try
    Code:
    myImage.Update()
    right after you put the image on the panel.

    Repaint is for system-wide updating of the entire "window".

    Comment

    • agsupriya86
      New Member
      • Mar 2007
      • 34

      #3
      Originally posted by bartonc
      Let's start by getting you terminology straightened out a bit.
      wxGlade is you GUI generator. While it's nice to know that you are using that to generate you GUI code, it's not relevant to your question.

      wxPython is you GUI Toolkit. That's what is relevant.

      To answer your question:
      You may want to try
      Code:
      myImage.Update()
      right after you put the image on the panel.

      Repaint is for system-wide updating of the entire "window".
      Actually the Image.Update() dint worked ..dunno why..but i found self.Refresh(Tr ue)
      to be useful.:)
      Thanx a ton for your help!

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by agsupriya86
        Actually the Image.Update() dint worked ..dunno why..but i found self.Refresh(Tr ue)
        to be useful.:)
        Thanx a ton for your help!
        You are welcome. I probably should have included that in my suggestion. I'm glad you found it.

        Comment

        Working...