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

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

Postby albeiroval » Mon Aug 28, 2017 3: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: Select all  Expand view  RUN

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: 379
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

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

Postby albeiroval » Wed Aug 30, 2017 2:28 pm

Up
Saludos,
Regards,

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

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

Postby ukoenig » Wed Aug 30, 2017 5: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: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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby albeiroval » Thu Aug 31, 2017 2: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
User avatar
albeiroval
 
Posts: 379
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

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

Postby Marcelo Roggeri » 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: Select all  Expand view  RUN

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

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

Postby nageswaragunupudi » 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: Select all  Expand view  RUN

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  Expand view  RUN

oCol:lBarGetOnKey := .t.
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby Marcelo Roggeri » Sun Aug 25, 2019 12:09 pm

Muchas gracias Mr. Rao por su ayuda
Saludos
Marcelo
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
 
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests