Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar

Post Reply
User avatar
albeiroval
Posts: 323
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar

Post by albeiroval »

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: Select all

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
Last edited by albeiroval on Thu Aug 31, 2017 3:55 pm, edited 1 time in total.
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
albeiroval
Posts: 323
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: Mr. Rao, why oCol:oBarGet does not take focus?

Post by albeiroval »

Up
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Mr. Rao, why oCol:oBarGet does not take focus?

Post by ukoenig »

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:oSeek:Setfont( oSFont )


Image

regards
Uwe :D
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.
User avatar
albeiroval
Posts: 323
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: Mr. Rao, why oCol:oBarGet does not take focus?

Post by albeiroval »

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
User avatar
Marcelo Roggeri
Posts: 275
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar

Post by Marcelo Roggeri »

Hola buenos dias, necesito que al abrir un dialogo el foco valla al get buscador de cierta columna

Code: Select all

.....
               // 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 - FivEdit (Cristobal Navarro)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar

Post by nageswaragunupudi »

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: Select all

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: Select all

oCol:lBarGetOnKey := .t.
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
Marcelo Roggeri
Posts: 275
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: Mr. Rao, oCol:oBarGet does not take focus with oBrw:bKeychar

Post by Marcelo Roggeri »

Muchas gracias Mr. Rao por su ayuda
Saludos
Marcelo
FWH - Harbour - BCC7 - PellesC - FivEdit (Cristobal Navarro)
Post Reply