Hi folks
I am facing 2 problems.
1)
I tried googlig for the last 4 hours and I am getting crazy
I can not find the method how to highlight a specific row in a grid
when I click on a cell in the row. It should look like when I click od
the label of a row.
I thought myself of just changing the background color but this does
not sattisfy me.
def OnGridPregledGridCellLeftClick(self, event):
self.grid.XXX(event.GetRow())
is there any way to to this.
2)
The second thing I am needing help with is a problem I am facing with
Events of a TextCtrl.
I wanted to create an autocomplete TextCtrl that is connected with a
database from witch it gets the suggested words.
self.txtUlica = wx.TextCtrl(-1, name='txtUlica',
parent=self, pos=wx.Point(352, 48), size=wx.Size(120,
21),
style=0, value='')
self.txtUlica.Bind(wx.EVT_TEXT, self.OnTxtUlicaText,
self.txtUlica)
···
---------------------------------------------
def OnTxtUlicaText(self, event):
currentUlica = self.txtUlica.GetValue()
suggestedUlica = self.DbAdapter.selByLike(currentUlica)
if suggestedUlica != "None":
self.txtUlica.SetValue(suggestedUlica)
self.txtUlica.SetSelection(len(currentUlica), len
(suggestedUlica))
------------------------------------------
Here I need some advise. Till now It is working fine. If I want to
write for example "Carry" and I type "Car", it writes Carry and
selects the part "ry". But if I want to write "Car", then "ry" stays
anyway even if I try to delete it.
So I thought myself to bind also another Eventhandler wich would react
with the TAB or ENTER key. I thought myself that this could be
wx.EVT_TEXT_ENTER event but I failed.
Any advise how to do it? Or is it maybe the KeyEvents
Thnx