FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to programmatically change a TCBrowse column's width?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
How to programmatically change a TCBrowse column's width?
Posted: Wed Aug 29, 2018 05:21 AM
I tried using
Code (fw): Select all Collapse
oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()


but that doesn't seem to work.

TIA
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How to programmatically change a TCBrowse column's width?
Posted: Wed Aug 29, 2018 09:28 AM

I'm also interested

Marco Boschi
info@marcoboschi.it
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to programmatically change a TCBrowse column's width?
Posted: Sat Sep 08, 2018 12:09 AM

Did you try:

DEFINE COLUMN...WIDTH nWidth...[ PIXELS ]

// general data columns

command DEFINE COLUMN <oCol> ;

        [ &lt;dat: DATA, SHOWBLOCK&gt; &lt;uData&gt; ] ;
        [ &lt;tit: TITLE, HEADER&gt; &lt;cHead&gt; [ &lt;oem: OEM, ANSI, CONVERT&gt;] ];
        [ &lt;clr: COLORS, COLOURS&gt; &lt;uClrFore&gt; [,&lt;uClrBack&gt;] ] ;
        [ ALIGN ] [ &lt;al: LEFT, CENTERED, RIGHT&gt; ] ;
        [ &lt;wid: WIDTH, SIZE&gt; &lt;nWidth&gt; [ PIXELS ] ] ;
        [ &lt;pict: PICT, PICTURE&gt; &lt;cPicture&gt; ] ;
        [ &lt;bit: BITMAP&gt; ] ;
        [ &lt;edit: EDITABLE&gt; ] ;
        [ MESSAGE &lt;cMsg&gt; ] ;
        [ VALID &lt;uValid&gt; ] ;
        [ ERROR [MSG] [MESSAGE] &lt;cErr&gt; ] ;
        [ &lt;lite: NOBAR, NOHILITE&gt; ] ;
        [ &lt;idx: ORDER, INDEX, TAG&gt; &lt;cOrder&gt; ] ;
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to programmatically change a TCBrowse column's width?
Posted: Sat Sep 08, 2018 05:52 AM

I'm trying to change the widths after the TCBrowse is already displayed James. Specifying the widths prior to that is not a problem

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to programmatically change a TCBrowse column's width?
Posted: Sat Sep 08, 2018 07:46 AM
hua wrote:I tried using
Code (fw): Select all Collapse
oBrw:aColumns[1]:nWidth := 1
oBrw:refresh()


but that doesn't seem to work.

TIA


Try

Code (fw): Select all Collapse
oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()


EMG
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to programmatically change a TCBrowse column's width?
Posted: Wed Sep 12, 2018 02:52 AM
Enrico,

Enrico Maria Giordano wrote:
Try

Code (fw): Select all Collapse
oBrw:aColumns[1]:nWidth := 1
oBrw:Default()
oBrw:refresh()


That works! Thank you!
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion