XBROWSE RESTRINGIR MULTISELECT

Re: XBROWSE RESTRINGIR MULTISELECT

Postby nageswaragunupudi » Fri Sep 06, 2013 4:02 am

I checked this with current version and also ver 12.04.
In my test when we right click oBrw:aSelected is showing all selected records correctly.

Please try this sample:
Code: Select all  Expand view  RUN
#include 'fivewin.ch'
#include 'xbrowse.ch'

REQUEST DBFCDX

function main()

   local oDlg, oBrw, oFont

   USE CUSTOMER NEW VIA "DBFCDX"
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 800,400 PIXEL FONT oFont TITLE FWVERSION
   @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
      AUTOCOLS LINES AUTOSORT NOBORDER

   WITH OBJECT oBrw
      :nMarqueeStyle    := MARQSTYLE_HIGHLROWMS
      :bClrSel          := { || { CLR_BLACK, CLR_HGRAY } }
      :bRClicked        := { || xbrowse( oBrw:aSelected, "SELECTED ROWS" ) }
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return 0
 


Image

If you still have a problem, please post a simple program to reproduce your problem.
Regards

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

Re: XBROWSE RESTRINGIR MULTISELECT (SOLUCIONADO!)

Postby MarioG » Fri Sep 06, 2013 1:22 pm

Mr. Rao
many thanks for your time

here is my sample, and i discovered my error!
Code: Select all  Expand view  RUN
#include 'fivewin.ch'
#include 'xbrowse.ch'

REQUEST DBFCDX

function main()

   local oDlg, oBrw, oFont

   USE CUSTOMER NEW VIA "DBFCDX"
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 800,400 PIXEL FONT oFont TITLE FWVERSION
   @ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
      AUTOCOLS LINES AUTOSORT NOBORDER

   WITH OBJECT oBrw
      :nMarqueeStyle    := MARQSTYLE_HIGHLROWMS
      :bClrSel          := { || { CLR_BLACK, CLR_HGRAY } }
      //:bRClicked        := { || xbrowse( oBrw:aSelected, "SELECTED ROWS" ) }
      :bRClicked        := {|nRow, nCol| MenuPop( nRow,nCol, oBrw ) }
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return 0

//----------------------------------
procedure MenuPop( nRow,nCol, oBrw )
local oMenu

/*
   oBrw:SetFocus()
   oBrw:lButtonDown(nRow,nCol)
   oBrw:lButtonUp(nRow,nCol)
*/

   MENU oMenu POPUP
      MENUITEM "Show aSelected" ;
      ACTION   xbrowse( oBrw:aSelected, "SELECTED ROWS" )
   ENDMENU

   ACTIVATE POPUP oMenu AT nRow, nCol OF oBrw
// Fin

I copy code from other source (when i was comented, wotrk fine)

many thanks again
Regards
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
MarioG
 
Posts: 1380
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: XBROWSE RESTRINGIR MULTISELECT

Postby nageswaragunupudi » Fri Sep 06, 2013 2:37 pm

Glad you got it working now.
Regards

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

Re: XBROWSE RESTRINGIR MULTISELECT

Postby sysctrl2 » Fri Sep 06, 2013 4:33 pm

en el Explorador de Windows, con las teclas:
CTRL+E, seleccionas todos los elementos,
en xbr. como se hace?
saludos..
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
sysctrl2
 
Posts: 1022
Joined: Mon Feb 05, 2007 7:15 pm

Re: XBROWSE RESTRINGIR MULTISELECT

Postby nageswaragunupudi » Sat Sep 07, 2013 4:18 am

oBrw:SelectAll() selects all rows.

I think it is Ctrl+A but not Ctrl+E.

To implement this behavior
Code: Select all  Expand view  RUN
     oBrw:bKeyChar         := { |nKey| If( nKey == 1, ( oBrw:SelectAll(), 0 ), nil ) }
 
Regards

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

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 27 guests