Top

$Did-tree for mdx TreeView


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  0.0
Scores Submitted  0
Date Added  Mar 01, 2004
Last Updated  Mar 27, 2007
Tags  dialog  event  graphic  gui  mdx  tree  view 
  Bookmark and Share

Introduction

/*
By Yochai Timmer
These commands will help you control a Tree View list.
I've made $did-tree to act like the regular $did command, and supports the props used for
$did-tree(dialog,ID,N) Gives you the text of the Nth branch, You have to use branch loaction and give all the root IDs before like 2 3 4 etc..
$did-tree(dialog,ID,N).lines Gives you the number of lines under the Nth root. (Not including line 1 of course)
$did-tree(dialog,ID) gives you the selected line's text.
$did-tree(dialog,ID).len Gives you the selected line's length.
$did-tree(dialog,ID).sel Gives you the selected line's branch location.
$did-tree(dialog,ID).root Gives you the selected line's root.
$did-tree(dialog,ID).lines Gives you the number of lines in the corrent branch.
$did-tree(dialog,ID).Event Will return the last event for that ID
$did-tree(dialog,ID,N).Tooltip Will give you the Branch's tooltip

Example, Rootview:

-Root {tab} Tooltip - root
|-Branch1
|-Branch2
-Root2
|-THing
|--Subthing {tab} This is the tooltip


The basic law is that mdx uses line 1 in each Branch, so the actuall lines that you see start from line 2
So the location of "Subthing" would be: 3 2 2
and the location of Branch2 would be: 2 3

Now to call check writen in the First root, seconed line you would use this: $did-tree(Dialog,ID,2 3)

Now lets assume that "Subthing" is selected now:
$did-tree(dialog,ID) Gives you Subthing
$did-tree(dialog,ID).len gives you 8
$did-tree(dialog,ID).sel gives you 3 2 2
$did-tree(dialog,ID).root gives you 3
$did-tree(dialog,ID).lines gives you 1 (There's only 1 line in that branch)
$did-tree(dialog,ID).Tooltip gives you This is the tooltip

$did-tree(dialog,ID,2) will give you Root
$did-tree(dialog,ID,2).lines will give you 2 (there are 2 branches under "root")
$did-tree(dialog,ID,2).Tooltip will give you Tooltip - root
$did-tree(dialog,ID,2).Event will give you Sclick

I like using %vars cause it's easier to read %names than $1 $2 $4, but it's not necessery, and you can change that.
*/

Grab the Code

Comments

  (2)  RSS
Yochai
Comments: 7
 
mIRC Snippet:  $Did-tree for mdx TreeView
Posted on Apr 12, 2004 8:28 am
Well, I would like to hear some comments :/
CRadle_of_filth
Comments: 49
 
mIRC Snippet:  $Did-tree for mdx TreeView
Posted on Apr 12, 2004 6:48 pm
what does this do again?

Please Register or Login to start posting comments.
Bottom