Problem in ListBox

Hi Robin,

I saw the sample app. i tried my app with some changes, now the vertical scroll bar is coming
but it is always scrolling up instead of scrolling down. In your app also it’s like that only.
i want the scroll bar to scroll down when new messages are appended to it.
More over my app can run over a long period of time so what i do
is, after a ceratin number of lines i delete the first line from the
top.

For that i have written a general function()

def clearBottomWindow(self,strMsg):
    if self.window.textWindow.GetCount() > self.maxLines:
        self.window.textWindow.Delete(0)
    self.window.textWindow.Append(self.getTimeStr()+strMsg)
    self.window.textWindow.SetSelection(self.window.textWindow.GetCount()-1)

My app uses a dll and a callback is done from my app to the dll at
regular intervals of time using ctypes. Based on the response i get
from the dll i append the listbox with the messages. So appending to
the list box is done when during callback.

There are 2 main problems i face right now:

  1. The vertical scroll bar is not scrolling down
  2. When the callback begins i append the listbox by calling
    self.clearBottomWindow(" vvvvvvvvv ")
    this function call is present at many places. What happens is that
    after this fn call my app gets hanged. Even the exit menu won’t work.
    ( i am right now debugging to find out what is the problem, since
    such a problem is not coming in windows). Instead of Listbox at first i
    tried using TextCtrl , then some Pango Error and some GTK error came.
    thats why i moved to listBox.

Robin, i really don’t know how to create a sample app with callbacks.

···


Regards,

Shine Anne