FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse TreeItem
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
xbrowse TreeItem
Posted: Sat Feb 26, 2011 07:56 AM

Dear All,

How to delete oTreeItem ( oItem:Delete() ) if oTreeItem:oNext is NIL?

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: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xbrowse TreeItem
Posted: Wed Mar 09, 2011 03:34 AM

Dear Mr. RAO,

Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?

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: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: xbrowse TreeItem
Posted: Wed Mar 09, 2011 09:43 AM

you Know how delete a record from xbrowse ?

Best Regards, Saludos



Falconi Silvio
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse TreeItem
Posted: Wed Mar 09, 2011 01:35 PM
fraxzi wrote:Dear Mr. RAO,


Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?


Kind Regards,
Frances

Actually this is not quite simple.
Version 10.12 handles this properly.
Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xbrowse TreeItem
Posted: Wed Mar 09, 2011 11:34 PM
nageswaragunupudi wrote:
fraxzi wrote:Dear Mr. RAO,


Any sample how to remove a tree treeitem from oTree?

If a condition is met.. this treeitem mus be remove. Any help?


Kind Regards,
Frances

Actually this is not quite simple.
Version 10.12 handles this properly.



I see..

I already requested my company for new FHW upgrade 11.1
I guess I need to wait for that.


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: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xbrowse TreeItem
Posted: Wed Mar 09, 2011 11:39 PM
Silvio wrote:you Know how delete a record from xbrowse ?


Dear Silvio,

In my case, I used VK_DELETE key assign it to bKeyChar with code block alias->( dbdelete() ) and refresh the xbrowse.

if you mean the ::oTreeItem:Delete(), doesn't work perfectly with my case.


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: 401
Joined: Tue Jan 05, 2010 02:33 PM
Re: xbrowse TreeItem
Posted: Thu Mar 10, 2011 07:39 AM

but I think you can delete a record and then refresh the tree

FWH .. BC582.. xharbour
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xbrowse TreeItem
Posted: Thu Mar 10, 2011 09:01 AM
MdaSolution wrote:but I think you can delete a record and then refresh the tree



My alternate solution is to exclude a record matching my condition..

Thank you for your suggestion.


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 TreeItem
Posted: Thu Mar 17, 2011 02:42 PM

Yes. For the time being, you can delete the record from the original data and then reconstruct the tree and refresh the browse. Seems very crude solution but works quite well and I myself used it under complex situations without hitting the performance.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 02:14 AM

Hello,

in other way are there the option to create a subtree or tree on run-time, per example all the item in the xbrowse are level 0 in the tree then by double click or another method we add a tree for the current row in the xbrowse and open it.

regards

Marcelo

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 02:50 AM
Yes.
Code (fw): Select all Collapse
WITH OBJECT oBrw:oTreeItem
   :SetTree( oSubTree )
   :Open()
END
oBrw:Refresh()
Regards



G. N. Rao.

Hyderabad, India
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 11:33 AM

Thanks very much Mr. RAO,

I found it and work, another question how can delete the tree without delete the root, in other words delete only the same tree added

regards

Marcelo

Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 12:38 PM

Hello again.

because I have thousands of records, I want to know if it possible to have a normal xBrowse database associated
with the possibility to make a tree in some row by demand, no for all, only for selected row

thanks in advance

Marcelo

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 02:22 PM
Marcelo Via Giglio wrote:Thanks very much Mr. RAO,

I found it and work, another question how can delete the tree without delete the root, in other words delete only the same tree added

regards

Marcelo


Code (fw): Select all Collapse
oItem:oTree := nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse TreeItem
Posted: Wed Apr 20, 2011 02:41 PM
Marcelo Via Giglio wrote:Hello again.

because I have thousands of records, I want to know if it possible to have a normal xBrowse database associated
with the possibility to make a tree in some row by demand, no for all, only for selected row

thanks in advance

Marcelo

Please try this:

Create browse of the DBF in the normal way.
Insert this line:
Code (fw): Select all Collapse
oBrw:SetTree( 1 )

just before activating window or dialog.

Now the browse will be on oBrw:oTree created automatically by XBrowse and each oItem of the oTree having the record number of the dbf.
When the tree is navigated, the dbf goes to the record. The browse will still look like the one you created on the dbf.

Now you add a child tree to any item you want.
Regards



G. N. Rao.

Hyderabad, India