Basic mIRC scripting does not support a treeview.

The scripts that you have seen that do support treeview, have probably used a 3rd party DLL. The two most common, for this type of usage, are MDX and DCX.