Page 1 of 2

lSeekBar

PostPosted: Wed Dec 28, 2016 8:51 am
by Silvio.Falconi
Can I set active lSeekBar on line ?

I inserted this parameter and it build a bar but I cannot click on it or search any It need any command ?

Image


I tried also the Mr Nages test
Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER NEW VIA "DBFCDX"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont TRUEPIXEL ;
      TITLE "FWH 16.12 : SEEK IN HEADER BAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" AUTOCOLS ;
      CELL LINES NOBORDER FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :lSeekBar    := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil


and it build the header and I cannot search any customer ( I not see the get with search bitmap)

Perhaps on Windows Seven 64 bit not run ?

I have bcc and fwh 16.12 with widows seven 64 bit

Re: lSeekBar

PostPosted: Wed Dec 28, 2016 2:47 pm
by nageswaragunupudi
1) Click on any header
2) Start typing what you want to search. It is just our usual incremental seek,

Works on all OS
Works with all compilers.

Re: lSeekBar

PostPosted: Wed Dec 28, 2016 3:10 pm
by kajot
when I compilte the same source w xHB.com and Pelles c compiler 3.0, I have error

Error BASE/1005 Message not found: TXBROWSE:LSEEKBAR |
| |
|Error at ...: _GENERROR(233) in Module: .\source\function\HARBOUR.PRG |
|Called from : TXBROWSE:_LSEEKBAR(9339) in Module: .\source\classes\XBROWSE.PRG |
|Called from : MAIN(20) in Module: t.prg |
|

Re: lSeekBar

PostPosted: Wed Dec 28, 2016 3:19 pm
by nageswaragunupudi
Error BASE/1005 Message not found: TXBROWSE:LSEEKBAR |

Requires FWH 16.12

Re: lSeekBar

PostPosted: Fri Dec 30, 2016 10:31 am
by Silvio.Falconi
not run nothing
I have fwh 16.12

Re: lSeekBar

PostPosted: Fri Dec 30, 2016 10:43 am
by Silvio.Falconi
Rao I use this test

Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER NEW VIA "DBFCDX"

    SET ORDER TO TAG FIRST

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont TRUEPIXEL ;
      TITLE "FWH 16.12 : SEEK IN HEADER BAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" AUTOCOLS ;
      CELL LINES NOBORDER FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :lSeekBar    := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil


I click on header ... not run anything
I digit a letter sample "F" not run anything

I not see the get and I not see the lupa bitmap as this image http://imagizer.imageshack.us/v2/xq90/922/1ynqdu.png



I send you a mail with exe ,prg and dbf
rename xxx file into zip or rar

Re: lSeekBar

PostPosted: Fri Dec 30, 2016 12:38 pm
by nageswaragunupudi
I send you a mail with exe ,prg and dbf

Please make sure you keep customer.cdx also along with the customer.dbf

Re: lSeekBar

PostPosted: Fri Dec 30, 2016 3:45 pm
by Silvio.Falconi
Please I made another sample to understand:
Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

static cFwhPath   := "c:\\work\\fwh\\"


function Main()

   local oDlg, oFont, oBrw
   local cPath    := cFwhPath + "samples\\"

   USE ( cPath + "CUSTOMER" ) NEW ALIAS CU SHARED

   INDEX ON FIRST TAG FIRST TO CTMP MEMORY
   INDEX ON LAST TAG LAST TO CTMP MEMORY


   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont TRUEPIXEL ;
      TITLE "FWH 16.12 : SEEK IN HEADER BAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CU" AUTOCOLS ;
      CELL LINES NOBORDER FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :lSeekBar    := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil


Now I see the lupa bmp but only on second column because there is the insex tag last

How I can to make this :
click on the heade r -> it must show the get of search ( on each column I make the index)

Re: lSeekBar

PostPosted: Fri Dec 30, 2016 7:46 pm
by kajot
I am using FWH 16.12 and xHB.com

Re: lSeekBar

PostPosted: Sat Dec 31, 2016 10:10 am
by ukoenig
In my test I used

DBSELECTAREA("KKASSE")

1. Index
ORDCREATE( ,"KASSE1","UPPER(KASS1)", {|| UPPER(KASS1) } , .F. )

2. Index
ORDCREATE( ,"KASSE2","KENNER", {|| KENNER } , .F. )


The browser

DBSELECTAREA( "KKASSE" )
( "KKASSE" )->(DBSETORDER("KASSE1"))
("KKASSE")->(DBGOTOP())

REDEFINE XBROWSE oBrw1 ID 110 OF oDlg1 AUTOSORT ;
COLUMNS { "KASS1", "KURZ1", "KENNER", "SIGNAL", "MERKER" } ;
ALIAS "KKASSE"
...
...
WITH OBJECT oBrw1
:bRecSelData := { |brw| brw:KeyNo }
:bRecSelHeader := { |brw| "Nr." } // or simply "SlNo"
:bRecSelFooter := { |brw| brw:nLen } // or Simpy any value
:nRecSelWidth := 50
:lSeekBar := .t.
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
END


clicking on the header the seek changes from index 1 to index 2

viewtopic.php?f=3&t=33376&p=196863#p196863

I couldn't detect anything wrong.

regards
Uwe :D

Re: lSeekBar

PostPosted: Sat Dec 31, 2016 10:47 am
by Silvio.Falconi
Please can use sample test of fivetech with dbfs ( customer)

Re: lSeekBar

PostPosted: Sun Jan 01, 2017 4:05 pm
by ukoenig
Silvio,

my changes on sample : xBrowgrd.prg using multiple index.
( added index FIRST and LAST )

just click on header < FIRST > or < LAST > to change the indexorder.

Image

Code: Select all  Expand view

#include 'fivewin.ch'
#include 'xbrowse.ch'

FUNCTION MAIN()
local oDlg, oBrw, oFont
local aRowGrad, aSelGrad, aStdGrad
local n := RGB( 157, 248, 255 )

REQUEST DBFCDX
RDDSETDEFAULT ( "DBFCDX" )
SETBALLOON( .T. )

XbrNumFormat( 'E', .t. )

aRowGrad := { { .5, RGB( 232, 241, 252 ), RGB(  232, 241, 252 ) }, ;
                 { .5, RGB( 210, 225, 244 ), RGB(  235, 243, 253 ) } }

aSelGrad := { { .5, RGB( 255, 255, 251 ), RGB( 255, 237, 178 ) }, ;
                 { .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }

USE CUSTOMER  
ORDCREATE( ,"CUST1","UPPER(FIRST)", {|| UPPER(FIRST) } , .F. )
ORDCREATE( ,"CUST2","UPPER(LAST)", {|| UPPER(LAST) } , .F. )

DEFINE FONT oFont NAME 'Tahoma' SIZE 0,-14

DEFINE DIALOG oDlg SIZE 740,440 PIXEL ;
FONT oFont TITLE 'XBrowse Gradient Rows FWH 9.12'

DBSETORDER("CUST1")

@ 10,10 XBROWSE oBrw OF oDlg ;
      SIZE -10,-10 PIXEL ;
      COLUMNS 'FIRST', "LAST", 'HIREDATE', 'MARRIED', 'SALARY' ;
      ALIAS 'CUSTOMER' LINES NOBORDER AUTOSORT

oBrw:Married:SetCheck()  // Default FWH Bitmap is Alpha

WITH OBJECT oBrw:First
      :AddBitmap( '\fwh\bitmaps\open2.bmp' ) // non-alpha bitmap
      :bBmpData   := { || 1 }
END

WITH OBJECT oBrw:HireDate
      :AddBitmap( '\fwh\bitmaps\Alphabmp\task.bmp' )  // alpha
      :bBmpData   := { || 1 }
END

WITH OBJECT oBrw
    :nStretchCol   := 1
    :nMarqueeStyle := 4
    :bClrSelFocus  := { || { CLR_BLACK, aSelGrad } }
    :bClrRowFocus  := { || { CLR_BLACK, aRowGrad } }
    :lSeekBar := .t.
    :bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
END

oBrw:CreateFromCode()

ACTIVATE DIALOG oDlg CENTERED

CLOSE CUSTOMER
RELEASE FONT oFont

RETURN NIL
 


regards
Uwe :D

Re: lSeekBar

PostPosted: Sun Jan 01, 2017 5:14 pm
by FranciscoA
Silvio.Falconi wrote:Please I made another sample to understand:
Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

static cFwhPath   := "c:\\work\\fwh\\"


function Main()

   local oDlg, oFont, oBrw
   local cPath    := cFwhPath + "samples\\"

   USE ( cPath + "CUSTOMER" ) NEW ALIAS CU SHARED

   INDEX ON FIRST TAG FIRST TO CTMP MEMORY
   INDEX ON LAST TAG LAST TO CTMP MEMORY


   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont TRUEPIXEL ;
      TITLE "FWH 16.12 : SEEK IN HEADER BAR"

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CU" AUTOCOLS ;
      CELL LINES NOBORDER FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :lSeekBar    := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil


Now I see the lupa bmp but only on second column because there is the insex tag last

How I can to make this :
click on the heade r -> it must show the get of search ( on each column I make the index)


Silvio, I think you are re-written the memory variable CTMP here.
Code: Select all  Expand view
INDEX ON FIRST TAG FIRST TO CTMP MEMORY
INDEX ON LAST TAG LAST TO CTMP MEMORY

Re: lSeekBar

PostPosted: Sun Jan 01, 2017 5:19 pm
by Silvio.Falconi
Sorry,
Uwe same error
I click on First and digit "Gary" the procedure go to the first "Gary" the selector move to first "Gary" founded ok

I thinked another.

I click on first and digit" Ga" the procedure must show me only the first name init with "Ga" ...

then I thinked....

the search filter procedure advise me must have a combobox with these options :

- All - as your search ( I digit "Gary" and it move to first" Gary"
- Advance Filter ( for a sample as my class Tfilter with not or and option)
- containing - Show only entries that contain the word
- Not containing - Show only entries that not contain the word
- a list (checkboxes ) of all possibility record sample :
"Achim"
"Adele"
"Adrian"
"Al"
"Alan"

Re: lSeekBar

PostPosted: Mon Jan 02, 2017 9:53 am
by Silvio.Falconi
Uwe,

I need to use buttons to activate/desactivate line seach


Please try this test


Code: Select all  Expand view


#include 'fivewin.ch'
#include 'xbrowse.ch'

FUNCTION MAIN()
local oDlg, oBrw, oFont
local aRowGrad, aSelGrad, aStdGrad
local n := RGB( 157, 248, 255 )

REQUEST DBFCDX
RDDSETDEFAULT ( "DBFCDX" )
SETBALLOON( .T. )

XbrNumFormat( 'E', .t. )

aRowGrad := { { .5, RGB( 232, 241, 252 ), RGB(  232, 241, 252 ) }, ;
                 { .5, RGB( 210, 225, 244 ), RGB(  235, 243, 253 ) } }

aSelGrad := { { .5, RGB( 255, 255, 251 ), RGB( 255, 237, 178 ) }, ;
                 { .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }

USE CUSTOMER
ORDCREATE( ,"CUST1","UPPER(FIRST)", {|| UPPER(FIRST) } , .F. )
ORDCREATE( ,"CUST2","UPPER(LAST)", {|| UPPER(LAST) } , .F. )

DEFINE FONT oFont NAME 'Tahoma' SIZE 0,-14

DEFINE DIALOG oDlg SIZE 780,440 PIXEL ;
FONT oFont TITLE 'XBrowse Gradient Rows FWH 9.12'

DBSETORDER("CUST1")

@ 10,10 XBROWSE oBrw OF oDlg ;
      SIZE 380,180 PIXEL ;
      COLUMNS 'FIRST', "LAST", 'HIREDATE', 'MARRIED', 'SALARY' ;
      ALIAS 'CUSTOMER'  NOBORDER AUTOSORT  //LINES

oBrw:Married:SetCheck()  // Default FWH Bitmap is Alpha

WITH OBJECT oBrw:First
      :AddBitmap( '\fwh\bitmaps\open2.bmp' ) // non-alpha bitmap
      :bBmpData   := { || 1 }
END

WITH OBJECT oBrw:HireDate
      :AddBitmap( '\fwh\bitmaps\Alphabmp\task.bmp' )  // alpha
      :bBmpData   := { || 1 }
END

WITH OBJECT oBrw
    :nStretchCol   := 1
    :nMarqueeStyle := 4
    :bClrSelFocus  := { || { CLR_BLACK, aSelGrad } }
    :bClrRowFocus  := { || { CLR_BLACK, aRowGrad } }
   * :lSeekBar := .t.
    :bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
END

oBrw:CreateFromCode()





 @ 200,12 BUTTON "Activate/desactivate filter "  size 90,20 PIXEL of oDlg  ACTION  ( oBrw:lGetBar := !  oBrw:lGetBar,  oBrw:Refresh())

 @ 200,112 BUTTON "Activate  filter "  size 50,20 PIXEL of oDlg ACTION ( ( oBrw:cAlias )->( SetFilter( oBrw ) ))

 @ 200,192 BUTTON "clear filter "  size 50,20 PIXEL of oDlg  ACTION  ((  oBrw:cAlias )->( DBCLEARFILTER(),  oBrw:Refresh(), oBrw:SetFocus() ))











ACTIVATE DIALOG oDlg CENTERED

CLOSE CUSTOMER
RELEASE FONT oFont

RETURN NIL