|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Someone that know a good tutorial about dialogs and tree view? i hope you understand what i mean:
____________________________________________
Menu |_Option 1 What that will show on this "menu" |_Option 2 What that will show on this "menu" |_Option 3 What that will show on this "menu" _____________________________________________
Option can also be a icon.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
One thing I can tell you is it would need a dll. I suggest using DCX.
Last edited by xDaeMoN; 24/03/06 06:16 PM.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I know i need a DLL, but the dll dosent have any good explanation "often anyway", so thats why i asked about a www page or anything else where i can reda about them
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
The link I gave you is from the DCX website which explains all the commands to be used for making a treeview. If that does not help, maybe others can give you a better link.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Didnt reply to anyone, just so i could post here again
alias setup { $iif(!$dialog(setup),dialog -m setup setup) }
dialog setup {
title "title"
size -1 -1 231 148
option dbu
list 2, 2 8 70 135
}
that will create a dialog with a "list", how can i add text in to that list that are clickable ? it can be done without any DLL ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If you only want to be able to click one item in that list, that code you currently have should work fine. If you want to be able to click more than one change to list 2, 2 8 70 135, extsel Of course you're going to have to add items to the list before you can click on them. There are several ways of adding text to a list. You should read up on the /did command in the help file.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I added as u said with extsel in the end, and i added a "text" in the listbox, and then i added:
on *:dialog:setup:*:*: { if ($devent == sclick) { if ($did == 3) { echo -a click } } }
the text in the listbox have the ID 3, how ever if i click on it nothing happen, anything i missing here ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
alias setup { $iif(!$dialog(setup),dialog -m setup setup) }
dialog setup { title "title" size -1 -1 231 148 option dbu
list 2, 2 8 70 135 }
I added as u said with extsel in the end, and i added a "text" in the listbox, and then i added:
on *:dialog:setup:*:*: { if ($devent == sclick) { if ($did == 3) { echo -a click } } } the text in the listbox have the ID 3, how ever if i click on it nothing happen, anything i missing here ?
alias setup { $iif(!$dialog(setup),dialog -dm setup setup,dialog -v setup) }
dialog setup {
title "title"
size -1 -1 231 148
option dbu
list 2, 2 8 70 135
text "This is just a label", 3, 2 0 70 8, center
}
on *:dialog:setup:init:0:{
loadbuf -o setup 2 versions.txt
}
on *:dialog:setup:sclick:2:{
echo -a $did(setup,2).seltext
}
on *:dialog:setup:sclick:3:{
echo -a Click!
} see that dialog ID 3 wont echo click its not used that way. look at the dialog "link" for clicking code] dialog setup { title "title" size -1 -1 231 148 option dbu list 2, 2 8 70 135 text "This is just a label", 3, 2 0 70 8, center link "This is clicker", 4, 72 0 70 8, center } on *:dialog:setup:init:0:{ loadbuf -o setup 2 versions.txt } on *:dialog:setup:sclick:2:{ echo -a $did(setup,2).seltext } on *:dialog:setup:sclick:3:{ echo -s Click! } on *:dialog:setup:sclick:4:{ echo -a Click! }[/code]
Last edited by MikeChat; 25/03/06 08:28 PM.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Ok, i got your point, the problem i have is now that i dont load anything from a *.txt file, i want to load images from a folder. "the names", and i dont know, but loadbuf -o wont do the trick ? do i have to first scan the folder, then add the names from the images in that folder in a *.txt file, then load them to listbox? or any simpler way ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on *:dialog:DNAME:init:*:{
var %a = 1, %b = $findfile($mircdir,*.*,0)
while %a <= %b {
did -a $dname ID $nopath($findfile($mircdir,*.*,0))
inc %a
}
}
That will load the names of the files from your mIRC directory (but not any of the sub-directories) into the dialog item ID, upon iniatialization of the dialog. Replace DNAME with the name of the dialog and ID with the appropriate ID number.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
to list files into a dialog list you can use $findfile(<path>,*.filetype,0,did -a dialogname ID $1-) or if you set the path somewhere and dont want the path with the file name $findfile(<path>,*.filetype,0,did -a dialogname ID $nopath($1-)) sample
dialog setup {
title ""
size -1 -1 150 150
option dbu
list 2, 5 14 70 140, sort
text "File List", 800, 5 0 35 8, center
link "Info", 700, 40 0 35 8, center
button "View", 901, 75 35 60 25
}
on *:dialog:setup:init:0:{
var %null = $findfile(bmp\,*.jpg,0,did -a setup 2 $nopath($1-))
var %null = $findfile(bmp\,*.gif,0,did -a setup 2 $nopath($1-))
}
on *:dialog:setup:dclick:2:{
;;do something with the picture
run bmp\ $+ $did(setup,2).seltext
}
on *:dialog:setup:sclick:901:{
;;do something with the picture
run bmp\ $+ $did(setup,2).seltext
}
on *:dialog:setup:sclick:700:{
;; do something else
var %filestuff = bmp\ $+ $did(setup,2).seltext
echo -a $did(setup,2).seltext $bytes($pic(%filestuff).size,k).suf $pic(%filestuff).width $pic(%filestuff).height
}
|
|
|
|
|