Page 1 of 1

get combobox

PostPosted: Mon Aug 27, 2018 5:34 am
by shark
The get object in combobox does not jump to next control when len get full.

What to do?

Re: get combobox

PostPosted: Mon Aug 27, 2018 8:07 am
by Antonio Linares
Try this:

oCombo:bChange = { || If( oCombo:oGet:TypeOut, oCombo:oWnd:GoNextCtrl( oCombo:hWnd ),) }

Re: get combobox

PostPosted: Mon Aug 27, 2018 4:17 pm
by shark
Antonio Linares wrote:Try this:

oCombo:bChange = { || If( oCombo:oGet:TypeOut, oCombo:oWnd:GoNextCtrl( oCombo:hWnd ),) }


Not Solved...

little change in code: "oGet:TypeOut" for "oGet:oGet:TypeOut", but, not go next control.

text in oGet is full select and do not go next.

see in image:

Image

Re: get combobox

PostPosted: Mon Aug 27, 2018 4:29 pm
by Antonio Linares
Please check if you ear the beep:

oCombo:bChange = { || If( oCombo:oGet:oGet:TypeOut, ( MsgBeep(), oCombo:oWnd:GoNextCtrl( oCombo:hWnd ) ),) }

Re: get combobox

PostPosted: Fri Aug 31, 2018 5:57 pm
by shark
Antonio Linares wrote:Please check if you ear the beep:

oCombo:bChange = { || If( oCombo:oGet:oGet:TypeOut, ( MsgBeep(), oCombo:oWnd:GoNextCtrl( oCombo:hWnd ) ),) }


No Beep. Not call function.

Re: get combobox

PostPosted: Thu Sep 27, 2018 5:23 am
by shark
Any Solution ???

Re: get combobox

PostPosted: Thu Sep 27, 2018 5:42 am
by shark
This command line bellow, call alert function, it´s ok. But... don´t execute GoNextCtrl()

oCombo:bChange = { || If( oCombo:oGet:oGet:TypeOut, ( alert("test"), oCombo:oWnd:GoNextCtrl( oCombo:hWnd ) ),) }

Any Solution?

Re: get combobox

PostPosted: Thu Sep 27, 2018 7:23 am
by shark
press ENTER key, do not execute GoNextCtrl too.

for solve this problem, I changed Method GetKeyChar() in TComboBox Class.

Code: Select all  Expand view
//----------------------------------------------------------------------------//

METHOD GetKeyChar( nKey ) CLASS TComboBox

   local nAt, cText
   local cSearch

   if nKey == VK_RETURN //   CHANGED HERE BY SHARK
      ::oWnd:GoNextCtrl( ::hWnd )
      return nKey // changed here by shark
   elseif ( nKey == VK_TAB .and. ! GetKeyState( VK_SHIFT ) )
      ::oWnd:GoNextCtrl( ::hWnd )
      return 0
   else
      if nKey == VK_TAB .and. GetKeyState( VK_SHIFT )
         ::oWnd:GoPrevCtrl( ::hWnd )
         return 0
      endif
   endif