Hi,
I have a listbox sitting next to a multi-line text control.
The listbox contains a list of commands and the text control
contains brief description of each of the commands.
The idea is that the user will click on a command in the listbox
and this will call a routine that will scroll to the description
of the command.
Here is the code triggered by the click on the listbox.
def OnFind(self,event):
# Get the selected command
theCmd = self.sqlCmdList.GetStringSelection()
theCmd = theCmd.strip(' ')
# Get the Search Text
theText = self.sqlHlpText.GetValue()
findString = "Command: "+theCmd
res = theText.find(findString)
if res == -1 :
wx.MessageBox(caption="Find Error",message="Could not find: "+theCmd+'*')
return
self.sqlHlpText.ShowPosition(res)
The good news is that this works on my linux box, the bad news is that it
does *NOT* work on the lastest MacOSX python/wxPython.
I suspect that this is related to the fact that PositionToXY(pos) is broken
on the Mac.
The ShowPosition is the only positioning thingy I have been able to find.
Any suggestions on how to solve the problem?
Jerry