"Resize" event for tcbrowse column

Post Reply
hterce
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am

"Resize" event for tcbrowse column

Post by hterce »

Hi,
What event gets triggered when the user resizes the column width of the tcbrowse control? I appreciate any help.

Bert
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: "Resize" event for tcbrowse column

Post by Antonio Linares »

Bert,

Class TCBrowse does not send any specific notification for such event.

What action do you need to do on such event ? We may provide you some info about how to do it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
hterce
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am

Re: "Resize" event for tcbrowse column

Post by hterce »

Hi,

This is just a cosmetic thing. I have a dialog with two "identical" grids. I want the grids to be of the same column widths all the time. So, I need to know if the user resizes the first grid so i can update the other one.

Thanks
Bert
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: "Resize" event for tcbrowse column

Post by Antonio Linares »

Bert,

You could easily modify Class TWBrowse Method LButtonUp() to fire such notification. Here I show you how to modify it. You may need to add a new DATA bColResized:

Code: Select all

METHOD LButtonUp( nRow, nCol, nFlags ) CLASS TWBrowse

   if ::lDrag
      return Super:LButtonUp( nRow, nCol, nFlags )
   endif

   if ::lCaptured
      ::lCaptured = .f.
      ReleaseCapture()
      ::VertLine()
      If ! Empty( ::bColResized )  // new !
         Eval( ::bColResized, Self )  // new !
      endif  // new !
   endif

   Super:LButtonUp( nRow, nCol, nFlags )

return nil
 
oBrowse:bColResized = { | oBrowse | ... your code ... }
regards, saludos

Antonio Linares
www.fivetechsoft.com
hterce
Posts: 10
Joined: Sat Dec 22, 2007 12:02 am

Re: "Resize" event for tcbrowse column

Post by hterce »

Antonio, thanks a lot. This should do it. Have a nice day.

Bert
Post Reply