[Closed] Dialogbar UI not accessable
Hi there, I am working on a script that scans a folder for maxscripts and puts them all into a dropdownlist. The selected script can then be launched with pressing the run button.
This works perfect so far. But i wanted to put the dialog as a dockable dialogbar to stay permanent. I figured that out as well, but my problem is now that i cannot access the dropdownlist anymore.
Events like “on dropdownlist selected x do” dont work anymore.
How can i access the selected Value?
clearlistener()
try (cui.UnRegisterDialogBar Toolbar) catch()
if Toolbar != undefined do destroyDialog Toolbar
MyPath = @"\\Pathtoscripts\"
fn ScanforScripts =
(
Scripts = getfiles (MyPath+"*.ms")
for a=1 to Scripts.count do
(
Scripts[a] = getFilenameFile Scripts[a]
)
print scripts
)
ScanforScripts()
rollout Toolbar "Toolbar"
(
dropdownlist Scriptlist items:Scripts width:120 pos:[4,4]
Button Run "Run" pos:[128,4]
Button Scan "Scan" pos:[168,4]
on Scriptlist selected x do
(
print Scriptlist.selected
)
on Run pressed do
(
Filetorun = (MyPath+Toolbar.Scriptlist.selected+".ms")
Filein Filetorun
)
on Scan pressed do
(
ScanforScripts()
Scriptlist.items = Scripts
)
)
createdialog Toolbar width:220 style:#(#style_toolwindow,#style_sysmenu)
cui.RegisterDialogBar Toolbar
If i disable the last line, everything works fine, but obviously it’s not a dialogbar anymore. Can someone help me out?
Apologies for my bad english…
i had the same problem with dropdownlist in rollout that is docked and max2014. When the rollout is not docked the ddl works, but when you dosk it – ddl becomes usless.
In max2013 the docked rollout with ddl in it works properly.
I remember someone reported a bug about that ( i think Martin Breidt )
Please report this issue too to get it fixed
Well, that’s bad news.
Anyway thank you guys, i’ll report the bug then as well.