FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TCBROWSE vs TWBROWSE
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 10:41 AM
I am using TCBROWSE as follows:

REDEFINE COLUMN BROWSE oListBox ID 40 OF oDlg_Search UPDATE ON DblClick ( lResult := .T., oDlg_Search:End() )
   oListBox:lLogicDrop := .T.
   oListBox:lMChange := .F.
   oListBox:nFreeze := 2
   oListBox:hBmpCursor := LoadBitmap( GetResources(), "Finger" )
     oListBox:cAlias = cAlias
     ADD COLUMN TO BROWSE oListBox DATA RECNO() SIZE 30 NOBAR CENTER HEADER "Rec" 
     ADD TO BROWSE oListBox DATA COMPANY HEADER "Company" OEM ALIGN LEFT WIDTH 100 PIXELS
   ADD TO BROWSE oListBox DATA SURNAME HEADER "Contact" OEM ALIGN LEFT WIDTH 100 PIXELS
   ADD TO BROWSE oListBox DATA TEL1 HEADER "Tel" OEM ALIGN LEFT WIDTH 100 PIXELS


I am unable to resize the columns. Should I be using TWBROWSE class? Is it better?
Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 11:14 AM

Ollie,

> oListBox:nFreeze := 2

Aren't you able to resize from column 3 on ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 03:22 PM

Correct, I cannot resize any. (Even if I remove the line:

oListBox:nFreeze := 2

altogether.

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 03:32 PM
Ollie wrote:oListBox:lMChange := .F.


oListBox:lMChange := .T.

or just remove that line (lMChange is .T. by default).

EMG
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 04:06 PM

Thanks, I can re-size the columns now.

But now I have a 'finger' cursor when I pause the mouse over the column headers.

Can I remove it, or 'do something' useful with it - what was it intended for?

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 04:36 PM

Ollie,

You can have an "Action" to be executed for each column when the column header is clicked. Use the clause ... ACTION <uAction1,...>

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 04:57 PM

And if I don't want to use the ACTION, can I 'remove' the 'finger' cursor?

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TCBROWSE vs TWBROWSE
Posted: Tue May 29, 2007 05:13 PM
Ollie,

In Class TCBrowse Method MouseMove() comment out this CursorHand() call:
                  if AScan( ::GetColSizes(),;
                       { | nColumn | nColPixPos += nColumn,;
                       nColPix >= nColPixPos - 2 .and. ;
                       nColPix <= nColPixPos + 2 }, ::nColPos ) != 0
                     CursorWE()
                  else
                     CursorHand()
                  endif
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion