to get full path in listbox

this is good scripter source .
that is directory list box script.

when i select list box item ,i would like to know full path name .

first of all , pls make directory in c

c:temp - a - aa
- b - bb
- c - cc
- d - dd

 
 
------------------------------------------------------------------------
 
materialib_path = "c:\\temp\\"
 
paths_array = #()
paths_array_list = #()
current_files = #()
bitmap_count = #()
 
fn matlist a b = ()
fn get_info = ()
 
 
 
 
fn build_paths path count =
(
	count = count + 1
	append paths_array path 
	append paths_array_list count
	dir_array = GetDirectories (path  + "*")
	if dir_array.count > 0 then
	(
		for i = 1 to dir_array.count do
		(
			build_paths dir_array[i] count
		)
	)
 
	return paths_array
)
 
fn makeoffsets li =
(
	list = deepcopy li
	for i = 1 to list.count do
	(
		ins = ""
		level = 1
		while level < paths_array_list[i] do
		(
			level = level + 1
			ins = ins + "     "
		)
		list[i] = ins + list[i]
	)
	return list
)
 
fn format_list list =
(
	r = deepcopy  list
	if r.count != 0 then
	(
		for i = 1 to r.count do
		(
			l = r[i]
			res = filterString l "\\"
			r[i] = res[(res.count)]
		)
	)
	return r
)
 
fn format_extensions list = 
(
	r = deepcopy list
	for i = 1 to r.count do
	(
		r[i] = (filterString r[i] ".")[1]
	)
	return r
)
 

rollout materialib_rollout "111_materiaLIB v0.2" width:300 height:910
(
	listbox lbx1 "categories:" pos:[2,24] width:160 height:55 items:#("ddd", "eee")
 
 
 
	on materialib_rollout open do 
	(
 
		matlist 1 materialib_rollout
 
		paths_array = #()
		build_paths materialib_path 0
		lbx1.items =  makeoffsets (format_list paths_array)
 
 
 
 
 
	)
 
	on lbx1 selected sel do
	(
		matlist sel materialib_rollout
 
		paths_array = #()
		ssss = #()
		build_paths materialib_path 0
		lbx1.items =  makeoffsets (format_list paths_array)
 
 
 
	)
	on lbx1 doubleClicked sel do
	(
 
	)
 
on lbx2 selected sel do
	(
 
 
 
 
 
	)
 
 
 
 
on lbx2 doubleClicked sel do
	(
 
	)
 
)
 
fn matlist sel materialib_rollout =
(
	try
	(
 
	)
	catch
	(
 
	)
)
 
fn get_file_count file =
(	
 
)
 
 
 
fn get_info sel materialib_rollout =
(
		try
		(
 
		)
		catch 
		(
 
		)
 
 
		try
		(
 
		)
		catch
		(
			try
			(
 
			)
			catch
			(
 
 
			)
		)
 
 
 
 
 
 
 
)
 
 
 
createdialog materialib_rollout style:#(#style_minimizebox, #style_titlebar, #style_sysmenu)
 
 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dussla's picture

really thank you

really thank you again
work is good

barigazy's picture

....

@dussia
Try to respect forum rule

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.