Page 1 of 1

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

PostPosted: Fri Jul 21, 2023 6:54 am
by Jimmy
hi,

how can i use Keyboard ENTER instead of "DblClick" :?:

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

PostPosted: Fri Jul 21, 2023 8:32 am
by nageswaragunupudi
Code: Select all  Expand view
SETUP ( oBrw:bKeyDown := { |k| If( k == 13, ( msginfo( "action" ) ), 0 ), nil)}

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

PostPosted: Fri Jul 21, 2023 11:58 pm
by Jimmy
hi

thx for Answer
nageswaragunupudi wrote:
Code: Select all  Expand view
SETUP ( oBrw:bKeyDown := { |k| If( k == 13, ( msginfo( "action" ) ), 0 ), nil)}
i think there is a ",0)" to much, or :?:
Code: Select all  Expand view
     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 view
     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 ) :?:

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

PostPosted: Sat Jul 22, 2023 5:36 am
by cnavarro

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

PostPosted: Sat Jul 22, 2023 9:42 am
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 view
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 :?:

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

PostPosted: Sat Jul 22, 2023 11:44 am
by nageswaragunupudi
This is what Mr. Cristobal advises:
Code: Select all  Expand view
XBROWSER aList TITLE "Tables" ;
   SETUP ( oBrw:cHeaders := { "TABLE" } ) ;
   SELECT oPgu:UseTable( oCol:Value )

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

PostPosted: Sat Jul 22, 2023 10:42 pm
by Jimmy
hi,

thx for Answer
nageswaragunupudi wrote:This is what Mr. Cristobal advises:

ok, that Syntax work