TCBROWSE vs TWBROWSE

TCBROWSE vs TWBROWSE

Postby Ollie » Tue May 29, 2007 10:41 am

I am using TCBROWSE as follows:

Code: Select all  Expand view
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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ollie » Tue May 29, 2007 3: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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Re: TCBROWSE vs TWBROWSE

Postby Enrico Maria Giordano » Tue May 29, 2007 3:32 pm

Ollie wrote:oListBox:lMChange := .F.


oListBox:lMChange := .T.

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Ollie » Tue May 29, 2007 4: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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » Tue May 29, 2007 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ollie » Tue May 29, 2007 4: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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby Antonio Linares » Tue May 29, 2007 5:13 pm

Ollie,

In Class TCBrowse Method MouseMove() comment out this CursorHand() call:
Code: Select all  Expand view
                  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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests