XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post Reply
User avatar
Jimmy
Posts: 1734
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by Jimmy »

hi,

how can i use Keyboard ENTER instead of "DblClick" :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by nageswaragunupudi »

Code: Select all | Expand

SETUP ( oBrw:bKeyDown := { |k| If( k == 13, ( msginfo( "action" ) ), 0 ), nil)}
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1734
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by Jimmy »

hi

thx for Answer
nageswaragunupudi wrote:

Code: Select all | Expand

SETUP ( oBrw:bKeyDown := { |k| If( k == 13, ( msginfo( "action" ) ), 0 ), nil)}
i think there is a ",0)" to much, or :?:

Code: Select all | Expand

      SETUP( oBrw:bKeyDown := { |k| If( k == 13, (msginfo("action") ), nil ) } )
i want to use it for Sample c:\fwh\samples\testpgre.prg

Code: Select all | Expand

      XBROWSER aList TITLE "Double-Click to Open" SETUP ( ;
         oBrw:cHeaders := { "TABLE" }, ;
         oBrw:aCols[ 1 ]:bLDClickData := { |r,c,f,o| ShowTable( o:Value ) } ,;
         oBrw:bKeyDown := {|k| If( k == 13, (msginfo("action") ), nil )  }
how do i get "select" line with "Tablename" ( o:Value ) :?:
greeting,
Jimmy
User avatar
cnavarro
Posts: 6555
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by cnavarro »

Dear Jimmy, use clause SELECT ( look .\include\xbrowse.ch )
https://forums.fivetechsupport.com/view ... 299#p63528
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Jimmy
Posts: 1734
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by Jimmy »

hi,

thx for Answaer
cnavarro wrote:use clause SELECT ( look .\include\xbrowse.ch )
as i "just" want it when ENTER i have made this CODE

Code: Select all | Expand

MEMVAR oValue
PRIVATE oValue

   XBROWSER aList TITLE "Double-Click to Open" ;
           SETUP( oBrw:lCanPaste := .t., ;
              oBrw:cHeaders := { "TABLE" }, ;
              oBrw:aCols[ 1 ] :bLDClickData := { | r, c, f, o | oPGU:UseTable( o:Value ) } ,;
           oValue := oBrw ,;
              oBrw:bKeyDown := { |k, nFlag| If( k == 13, ;
                ( xValue := oValue:aCols[ 1 ]:Value ,;
                SELECT ( oPGU:UseTable(xValue) ) ) ,;
              NIL) } )
but i need a PRIVATE to get it work ... is there a better Solution :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10701
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 3 times
Contact:

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by nageswaragunupudi »

This is what Mr. Cristobal advises:

Code: Select all | Expand

XBROWSER aList TITLE "Tables" ;
   SETUP ( oBrw:cHeaders := { "TABLE" } ) ;
   SELECT oPgu:UseTable( oCol:Value )
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1734
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: XBROWSER aList TITLE "Double-Click to Open" SETUP()

Post by Jimmy »

hi,

thx for Answer
nageswaragunupudi wrote:This is what Mr. Cristobal advises:
ok, that Syntax work
greeting,
Jimmy
Post Reply