New get at bottom of xBrowse!? ( Solved! )

Re: New get at bottom of xBrowse!?

Postby James Bott » Wed Dec 31, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: New get at bottom of xBrowse!?

Postby JC » Wed Dec 31, 2008 12:36 pm

James,

The code for executing search ir ready!
When the user clicks at header column...
Code: Select all  Expand view
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: New get at bottom of xBrowse!?

Postby JC » Tue Jan 06, 2009 5: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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: New get at bottom of xBrowse!?

Postby James Bott » Wed Jan 07, 2009 1: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: New get at bottom of xBrowse!?

Postby JC » 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!
Code: Select all  Expand view
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: New get at bottom of xBrowse!?

Postby JC » Wed Jan 07, 2009 7: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!
Image
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: New get at bottom of xBrowse!?

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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

cron