Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Tree View - Help


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-02-2008, 08:07 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default Tree View - Help

Been playing aroun with tree view...

How do I add a new node to the currently selected node
(i.e:Add a grandson to the selected grandparent, beetween several grandparents)
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #2 (permalink)  
Old 06-02-2008, 03:03 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

Something like:
Code:
    node1.Value = tree.SelectedNode
    node1.AddNewNode("some text")
Reply With Quote
  #3 (permalink)  
Old 06-02-2008, 05:42 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

I was so close and yet so far...
I tryied:
Node1.Value=TV.SelectedNode
Node1.Value=Node2.New Node

Wich of course didn't work....

Thanks Erel
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #4 (permalink)  
Old 06-03-2008, 06:00 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

OK, so I got that working bit, now I need to remove all created nodes up to the root, clearing the tree object...
BUT, I do not wich to dispose of the treeview object...

I tryied Tree.RemoveAllNodes method, but nothing gets deleted...
What am I missing?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #5 (permalink)  
Old 06-03-2008, 06:19 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

Can you upload your project?
Tree.RemoveAllNodes should remove all nodes.
Reply With Quote
  #6 (permalink)  
Old 06-03-2008, 06:30 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

This is a work in progress so some bugs may occur or some part of code be missing..
only the spb file is uploaded...

baiscally, when the user shoses "New", I have to check if a file is in use and warn the user about it, if he cooses to continue, the the current treeview, should be cleared of all nodes and be made "Blank"....
Since it uses treeview, controlsEx.dll is required,lol...
Attached Files
File Type: sbp INIv2.sbp (1.3 KB, 8 views)
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #7 (permalink)  
Old 06-03-2008, 09:52 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Got it working, using RemoveAllNodes, but I would hav sworn, i had already tried it, and failled....
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #8 (permalink)  
Old 06-04-2008, 06:58 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Now another issue..

In order to have a context nemu, I was "forced" to add formlib...
Figured out how to add a context menu, so far so good...
New problems arise...

I seem to only need One Node Object to create how many sub-levels I want or need in the treeView...But I NEED to limit the node to 3 Levels...
Root,Category and Key asin Parent, son and grandson...
How?

And how do I delete a selected Node?
I tryied removenode, removenodeat with no success...

HELP???
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #9 (permalink)  
Old 06-05-2008, 05:43 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

See the attached example.
Attached Files
File Type: sbp 1.sbp (1.4 KB, 16 views)
Reply With Quote
  #10 (permalink)  
Old 06-06-2008, 08:39 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Your example is almost perfect for my aplication, and I understand how the level catching works...
But I still have one issue(for the time being...)...

I have 1 Tree Object (tree) and 2 Node Objects(Parent and Node in order to make sense of your example...)
The 3 level limitation works great...but what is I wish to limit it to just 2 levels?
I tryed to alter your example but I got nowere...
Here's my project as is...
need both controlsEx and FormLib dlls...
My intension is:
Tree Root is the INI Filename (setted for now as Default.INI)
Key and Comment can exist in any alowed sub level...
ie:
+Default.INI
|--Key01
|--Comment01
+-Category01
XX|-Key02
XX|-Comment02

BUT Category can only be one level deep..
ie:
+Default.INI
|--Key01
|--Comment01
+-Category01
XX|-Key02
XX|-Comment02
XX|-Category02 - Cannot exist

PS:
Hopefully this will become a structured INI file creator, wich I believe will help those of us who relly on them for some settings...setting
Attached Files
File Type: sbp teste.sbp (2.8 KB, 1 views)
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another problem with tree view RandomCoder Questions & Help Needed 8 02-28-2008 11:36 AM
Registry to Tree View willisgt Questions & Help Needed 0 02-20-2008 04:17 PM
Context Menu and Tree View. RandomCoder Questions & Help Needed 4 02-18-2008 04:35 PM
Can´t view whole Website with PPC Browser Smurfy2000 Forum Discussion 3 02-13-2008 08:08 AM
Tree View Images RandomCoder Questions & Help Needed 8 02-08-2008 04:16 PM


All times are GMT. The time now is 07:43 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0