FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse Tree with Checkbox
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 05:52 AM

Dear All,

Anyone has this created Tree with xbrowse with checkbox on tree item?

Kind Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 06:29 AM

Using ADD TO oBrw, add a column with appropriate logical expression as DATA and use method oCol:SetCheck()

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 06:59 AM
nageswaragunupudi wrote:Using ADD TO oBrw, add a column with appropriate logical expression as DATA and use method oCol:SetCheck()



Dear Mr. RAO,


That is what I have right now... I mean the checkbox integrated with oTreeitem... as image?


Kind Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 11:21 AM

Do you want it as a bitmap inside the column displaying treeitem:cPrompt ?

In that case, add bmpdata to oBrw:aCols[ 1 ] and add bitmaps to this column

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 12:19 PM
nageswaragunupudi wrote:Do you want it as a bitmap inside the column displaying treeitem:cPrompt ?

In that case, add bmpdata to oBrw:aCols[ 1 ] and add bitmaps to this column



Dear Mr. RAO,

Thank you for your reply.. This is my situation..
Here's the screenshoot of what I have right now..



There is bitmap for each tree Item.. can I put another bitmap after the other indicating check/uncheck? then no more :setcheck() on the second column..

Kind Regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Tree with Checkbox
Posted: Thu Mar 24, 2011 02:09 PM

You may need two bitmaps ( selected and unselected ) for the last level. Once you add bitmaps, it is a matter of changing the bBmpData of the first column. You may copy the original codeblock from the settree method and suitably modify it.

Still I personally feel that it may not look good aesthetically. My personal preference would be to insert a separate column before the present first column to show the checkboxes. This would also look similar to Windows 7 selection check boxes.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion