forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


SSTreeview question [SOLVED]
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat May 29, 2010 3:55 pm    Post subject: SSTreeview question [SOLVED] Reply with quote

Hi forum Smile ,
I'm here to make an another question, (another time) Crying or Very sad
I'm writing a script using SsTreeView dll, at now I would create a text search in the treeview element, anyone know how to examine each treeview element to find a text string?

Many Tnx in advance for any info or idea

Byez


Last edited by Tdk161 on Mon Apr 04, 2011 3:59 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Sun May 30, 2010 8:37 pm    Post subject: Find text in SSTreeView Reply with quote

Hi TdK161,

I'm working on the SSTreeView also these days, and I recognize your problem.
As far as I can see, there's no way to do these things in the TreeView control itself, as the data is not very accessible. This is also a problem when trying to save and load a file from and into the tree.
My solution was to keep a copy of the TreeView in a list, making it possible to save and load, but also offering the opportunity to search the list, e.g. with the @match() function.
If you want, I can offer you the source code, but it's integrated into the whole software: I need to isolate it, to make it workable for you.
I will do this this week a.s.a.p. and post it in this thread.

Best regards,
Claz
Back to top
View user's profile Send private message
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Mon May 31, 2010 7:33 am    Post subject: VDS code to search for text in a treeview control. Reply with quote

Hi TDK161,

I isolated the code from the application and tried to post it.

Then I got the following message "Sorry, you have reached your maximum Upload Quota Limit of 512 KB".
The zipped code is only 80 kB...

Does anybody know why I get this message and how it could be solved?

Much obliged.

Regards,
Claz
Back to top
View user's profile Send private message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon May 31, 2010 3:56 pm    Post subject: Reply with quote

Hi Claz Smile

you can upload your code using two ways (I think)

or copy&paste code in a new post in this thread or upload file into a fileserver like Mediafire or Rapidshare or Megaupload and post the download link here

Many tnx for your job

Byez
Back to top
View user's profile Send private message Send e-mail
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Mon May 31, 2010 5:56 pm    Post subject: Posted TreeManager.zip at Rapidshare Reply with quote

Hi Tdk161,

The app consists of several files, so I posted the zip files at:

http://rapidshare.com/files/393717950/TreeManager.zip.html.

I hope this works...

Regards,
Claz
Back to top
View user's profile Send private message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon May 31, 2010 6:20 pm    Post subject: Reply with quote

Very Happy Many many tnx Claz,
your project work well I think the gui is very nice
And I found how to perform a search in the treeview
Thanks again man

Byez Smile
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Mon May 31, 2010 7:01 pm    Post subject: Reply with quote

Hi guys Very Happy

Woww, very nice GUI, Claz.

I made a DSU that works with SSTreeView library, not more fantastic than your GUI.

View this thread:

http://forum.vdsworld.com/viewtopic.php?t=4727&highlight=treedsu

Enjoy!

_____________

uVeDeSe
_____________
Back to top
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Jun 01, 2010 9:43 am    Post subject: Reply with quote

Hi guys,

thanks for the compliments... it lights up my day Very Happy

Nice to hear that it seems Tdk161 found his solution.

uvedese: as you can see, I'm using your TreeDSU in this app.
The DSU really makes it much easier to handle the Treeview control.

Unfortunately I had some issues, when using it:

- I needed to see the data without encryption to be able to connect the tree to data in a database and to be able to understand what was happening ;

- The 'ToParent' function reacts unlogical to me: remove the comments in ":ToParentButton" and run the app with Claz.tree.
If I select Item A1 and press the Parent button, then this child is moved one level up (as a sister from ItemA), but child Item A2, being a child of Item A also, is now a child from Item A1. I think the parent function needs to be corrected and avoid undesired changes to other tree elements.

- Dragging elements also behaves unlogical for me, similar to the DragDrop.dsc example from SSTreeview.

If these issues were solved, your TreeDSU would be a perfect wrapper for SSTreeView, offering the most wanted functions in a very easy and convenient way.

Best regards,
Klaas
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Jun 02, 2010 11:42 am    Post subject: Reply with quote

Ooopppps Embarassed

I'm sorry Claz.

I just tried your software without looking the files contents.

I'm working in those issues now.

I don't use dragging elements because I think there is a bug in SSTreeView original library and we can lost some elements in tree.

And I try to update TreeDSU in order to have a new function to search.

Thanks
Back to top
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Wed Jun 02, 2010 6:04 pm    Post subject: Reply with quote

No need to apologize: the only way to avoid making mistakes is to do nothing... Laughing

I tend to agree on your remark about drag & drop: though I did not spent time to look at it, I noticed that the SSTreeView example behaved a bit strange, so I did not use it (yet).

I could not find a solution to search in the TreeView itself by looking at the commands and functions, but I didn't care a lot, because the user needs to search in the associated data mostly anyway.
I put this data in a separate list or table when opening the file.

If you look at Claz.tree with an ascii text editor, you will notice that I placed the level indicator at front, followed by the child ID, name, state, icon & bold settings and a key at the end.
This key is just an ordinary timestamp; I deleted the comma to avoid problems with the scripting.

I'm very curious if you can find a solution to search without the need of a separate datafile, because it could be very convenient in other applications.

Last question: is there a reason why you save the treelist data encrypted?


Good luck with your work !
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Jun 02, 2010 10:02 pm    Post subject: Reply with quote

Hi Claz:

I have already implemented a function of search for TreeDSU. To do this, I use the list with the same ID that Tree control (command Tree init) where I load all data of tree in order to search the query words.

I had the idea of encript tree data because I thought to create TreeDSU to associate each tree item with general data (as rich text documents, databases, etc.)

About functions "ToParent" and "ToChild", in fact, there were some bugs... I will try to depurate them.

I will continue working on it...

See you Wink
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Jun 02, 2010 11:13 pm    Post subject: Reply with quote

Hi Claz Smile

I changed little bit the part of your script to search

Code:
:SearchButton
 %%SearchText = @dlgtext(SearchText)
 if %%SearchText
  List seek,Cerca,0
  %%Lins = @Next(Cerca)
  While @Ok()
    PARSE "%%Level;%%ID;%%Text;%%State;%%Image;%%SelImage;%%Children;%%Data",%%Lins
    If @Zero(@Pos(%%SearchText,%%Lins))
      treeview setBold,TreeDsu1,%%ID,0
    Else
      treeview setBold,TreeDsu1,%%ID,1
    End
    %%Lins = @Next(Cerca)
  Wend
 End
GOTO Loop


in my script I use Cerca instead of List1

Simply I set to Bold any occurence

Hope to be interested to you Smile

Byez and thank's again
Back to top
View user's profile Send private message Send e-mail
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Mon Jun 07, 2010 9:24 am    Post subject: Reply with quote

Hi guys,

Seems we're really progressing in using the Treeview control!

@tdk161: I integrated your code into the TreeManager: works very nice indeed! Thanks

Regards,
Claz
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Mon Jun 07, 2010 3:18 pm    Post subject: Reply with quote

Hi guys:

I updated TreeDSU to ver 1.1.

http://vds.uvedese.es/index.php?option=com_content&task=view&id=161&Itemid=52

In this version I fixed some problems (toParent) and I added two new functions to search into the tree control (searchNext & searchPrev). This functions can match (find) a string into extra-data too.

Enjoy Wink

_______________

uVeDeSe
_______________
Back to top
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Jun 08, 2010 5:43 pm    Post subject: Reply with quote

Hi Uvedese,

Just downloaded V1.1 and it works great!

The ToParent and ToChild functions now behave very naturally and the Search function is working good also.

Thanx for the good work: I'm definitely going to use more in the future!

Claz
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group