Page 1 of 1

ComboBox GetKeyChar() Method

Posted: Wed Sep 26, 2018 12:22 am
by fraxzi
Hi All,

I noticed that TComboBox:nAt is not updated when GetKeyChar() hit a match ...
It would be handy though ...

So when user press char in oCbx:oGet and hit a match, we can retrieve other info relative to oCbx:nAt from another array...
Like 'name' in oCbx:aItem to var1 and aAddr[ oCbx:nAt ] to var2 and so on ...

Any thoughts :?:

Re: ComboBox GetKeyChar() Method

Posted: Wed Sep 26, 2018 1:34 am
by fraxzi
I added and tested this lines which serves the purpose..
i dunno if I made it right or any other ways so I can avoid modifying the original ComboBox source if any? ... I mean, I tried several ways as well..

Image

Anyone with better idea :idea: :?:

Re: ComboBox GetKeyChar() Method

Posted: Wed Sep 26, 2018 1:47 am
by fraxzi
Much better ...

Code: Select all

...
            If ::bChange <> NIL 
               ::Select( nAt ) 
               Eval( ::bChange, Self, ::VarGet() )
            End
...