FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar
Posted: Mon Aug 28, 2017 03:29 PM
Hello Mr Rao,

I try to use oBrw:bKeyChar with oBarGet but it does not take focus, for the input of the search string.
Here is the code I use
Code (fw): Select all Collapse
Function Main()
  ...
  
  oBrw::bKeyChar = {|nKey| QuerySeekWild( oBrw, oQry, cQuery, nKey )}

 ...

RETURN Nil

Static Function QuerySeekWild( oBrw,  oQry, cQuery, nKey )

  ...

  oBrw:lGetBar   = .T.
  oBrw:nGetBarHeight  = 40
  AEval( oBrw:aCols, {|o| o:uBarGetVal := "", o:bClrEdit   := {|| { CLR_BLACK, CLR_YELLOW } } } )
  oBrw:Refresh()

  ...

  oCol:uBarGetVal = uSeek  
  oCol:CreateBarGet()

  oCol:oBarGet:SetFocus() <--- // Here I need to activate control get with oCol:oBarGet
                               // the get control does not take focus
                               // for the user enters the search string
  ...

  oBrw:lGetBar = .F.
  oBrw:Refresh()
  
RETURN uSeek

Thanks for the help
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Re: Mr. Rao, why oCol:oBarGet does not take focus?
Posted: Wed Aug 30, 2017 02:28 PM

Up

Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Mr. Rao, why oCol:oBarGet does not take focus?
Posted: Wed Aug 30, 2017 05:26 PM
Albeiro,

activate the seekbar with a mouseclick on a selected column-header ( index ).

1. Seekbar

WITH OBJECT oBrw1
:lSeekBar := .t.
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }

...
...
END

2. using SAY

@ 250, 220 SAY oBrw2:oSeek PROMPT oBrw2:cSeek SIZE 50, 12 PIXEL BORDER ;
OF oFld1:aDialogs[1] COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'
oBrw2:Setfont( oSFont )




regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Re: Mr. Rao, why oCol:oBarGet does not take focus?
Posted: Thu Aug 31, 2017 02:00 PM

Uwe, thanks for answering,

I understand that by clicking on the header of the column I order the data, and oBrw: lGetBar = .T. activate the Tget oCol:oGetBar, and clicking on oCol:oGetBar I can edit.

I require is to activate oCol:oGetBar when user type keyboard then call oBrw:bKeychar, here user edit string search,
and disable oCol:oGetBar, when user type VK_ENTER or VK_ESCAPE.

Excuse my English

Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
Posts: 344
Joined: Sat Jul 22, 2006 09:04 PM
Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar
Posted: Sat Aug 24, 2019 12:31 PM
Hola buenos dias, necesito que al abrir un dialogo el foco valla al get buscador de cierta columna
Code (fw): Select all Collapse
.....
               // BARRA DE BUSQUEDA
               ::oBrw:lGetBar       := .T.
               ::oBrw:nGetBarHeight := 30

               ::oBrw:aCols[1]:uBarGetVal    := Space(100)
               ::oBrw:aCols[1]:cBarGetBmp    := "BB_SEARCH(30x30)"
               ::oBrw:aCols[1]:bBarGetAction := {|| ::SetFilterRegistro(::oBrw,::oQry) }
               ::oBrw:aCols[1]:bBarGetValid  := {|x| ::SetFilterRegistro(::oBrw,::oQry), .T.}


               ::oBrw:aCols[2]:uBarGetVal    := Space(11)
               ::oBrw:aCols[2]:aBarGetList   := ::aEspecialidades
               ::oBrw:aCols[2]:bBarGetChange := {|| ::SetFilterRegistro(::oBrw,::oQry) }

               ::oBrw:bClrEdits := { || { CLR_BLACK,rgb(255,250,240) } }
               // BARRA DE BUSQUEDA

.....
ACTIVATE DIALOG oDlg CENTERED ON INIT oSelf:oBrw:aCols[1]:oBarGet:SetFocus()


en una window lo hace pero en un dialog no
Espero ayuda, gracias
Marcelo
FWH - Harbour - BCC7 - PellesC
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar
Posted: Sun Aug 25, 2019 11:48 AM
albeiroval wrote:Hello Mr Rao,

I try to use oBrw:bKeyChar with oBarGet but it does not take focus, for the input of the search string.
Here is the code I use
Code (fw): Select all Collapse
Function Main()
  ...
  
  oBrw::bKeyChar = {|nKey| QuerySeekWild( oBrw, oQry, cQuery, nKey )}

 ...

RETURN Nil

Static Function QuerySeekWild( oBrw,  oQry, cQuery, nKey )

  ...

  oBrw:lGetBar   = .T.
  oBrw:nGetBarHeight  = 40
  AEval( oBrw:aCols, {|o| o:uBarGetVal := "", o:bClrEdit   := {|| { CLR_BLACK, CLR_YELLOW } } } )
  oBrw:Refresh()

  ...

  oCol:uBarGetVal = uSeek  
  oCol:CreateBarGet()

  oCol:oBarGet:SetFocus() <--- // Here I need to activate control get with oCol:oBarGet
                               // the get control does not take focus
                               // for the user enters the search string
  ...

  oBrw:lGetBar = .F.
  oBrw:Refresh()
  
RETURN uSeek

Thanks for the help


Do not use bKeyChar !!!

Simply set
Code (fw): Select all Collapse
oCol:lBarGetOnKey := .t.
Regards



G. N. Rao.

Hyderabad, India
Posts: 344
Joined: Sat Jul 22, 2006 09:04 PM
Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar
Posted: Sun Aug 25, 2019 12:09 PM

Muchas gracias Mr. Rao por su ayuda
Saludos
Marcelo

FWH - Harbour - BCC7 - PellesC

Continue the discussion