FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New get at bottom of xBrowse!? ( Solved! )
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: New get at bottom of xBrowse!?
Posted: Wed Dec 31, 2008 05:30 AM

Julio,

>When the user clicks the header of any column, the xbrowse should open a get at footer in the same, to perform an incremental search with that column

To do it like that is going to very complex. It will require subclassing the browse and making lots of changes.

I suggest putting a buttonbar at the top of the window and putting the GET inside the buttonbar. Searches are almost always at the top of the screen, and this will not require any changes to the browse.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Wed Dec 31, 2008 12:36 PM
James,

The code for executing search ir ready!
When the user clicks at header column...
nCol := ::oBrw:MouseColPos( nMCol )

IF !lDragged

   oCol := ::oBrw:colAtPos( nCol )

   WITH OBJECT oCol

           bColorBefore := :bClrStd

           :bClrStd := {|| { CLR_BLACK, nrgb( 237, 237, 237 ) } }

           ::oBrw:selectCol( nCol )

           // Executing incremental search
           eval( {|| ::oBrw:columnSearch() }, nMRow, nMCol, nFlags, Self )

           :bClrStd := bColorBefore
           ::oBrw:refresh()

        ENDIF

   END

ENDIF

I want, in :columnSearch(), to create a get (runtime) for perform this search...
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Tue Jan 06, 2009 05:31 PM

The reason for doing this kind of routine is the fact that our system has several resources with xbrowse in different sizes.
I want to do something within the class of xbrowse for not set for each screen using the browser.

Thus, I have an incremental search on any screen where there is a xbrowse.

Please, somebody help me!
Thanks!

Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: New get at bottom of xBrowse!?
Posted: Wed Jan 07, 2009 01:11 AM

Julio,

>The reason for doing this kind of routine is the fact that our system has several resources with xbrowse in different sizes.
>I want to do something within the class of xbrowse for not set for each screen using the browser.

I still think it will be less work to add a buttonbar containing a GET to each screen than the work required to modify xBrowse. And if you do modify xbrowse then you have make your changes to each new version of FW and test them. Even if you subclass xbrowse (instead of modifying it), you will still need to test the subclass with each new version of FW.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Wed Jan 07, 2009 12:21 PM
James,

I understand your concern about the maintenance of routine developed.
But my idea was not need to define a resource get through each time you need to do a search on browse.

I tried this solution and it's ok, apparently!
nWdGet := oBrw:brwWidth() + iif( oBrw:lVScroll, getSysMetrics( 20 ), 0 )

@ ( oBrw:nTop + oBrw:nHeight ) - 20, oBrw:nLeft GET oBrwGet VAR uBrwGet OF oBrw:oWnd PIXEL SIZE nWdGet, 20
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: New get at bottom of xBrowse!?
Posted: Wed Jan 07, 2009 07:43 PM
Dear friend James,

This is the result of my intention. The column clicked is formated with lighter shade of gray.
I have created a public function to do it and allways call when the column of xbrowse is clicked!
Peace and lighting!

JĂșlio CĂ©sar M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: New get at bottom of xBrowse!?
Posted: Wed Jan 07, 2009 11:34 PM

Julio,

Glad to see you got it working the way you wanted. I wouldn't have thought of your solution.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion