需要一个好主意:) [英] need a good idea :)

查看:80
本文介绍了需要一个好主意:)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


i在这里需要一些帮助plz :)

我正在构建一个小应用程序,它将显示文件夹列表

在列表框中,但我只想显示文件夹名称而不是整个路径的

,所以我从整个路径中取出子串并添加它

到列表框。

问题是,稍后,当用户选择使用此

文件执行任何操作时,我希望获得整个路径(强制执行) ),但现在我只有

有名字而不是路径。


我做的虚拟解决方案,是获取所选索引的索引并且

然后从该索引的路径列表中获取路径,但我不喜欢这样的解决方案,我认为它不专业也不高效。 />

所以任何想法?


我正在使用VS2003,c#构建桌面应用程序

谢谢时间和帮助

Hi all,

i need some help here plz :)
i''m building a small application that will dispaly a list of folders
in a listbox, but i only want to display the folder name rather than
the whole path, so i take the substring from the whole path and add it
to the listbox.
the problem is, later, when the user selects to do anything with this
file, i want to get the whole path back(mandatory), but now i only
have the the name and not the path.

the dummy solution i do, is to get the index of the selected index and
then get the path from teh path list at that index, but i don''t like
such a solution, i think its not professional nor efficient.

so any ideas??

i''m using VS2003, c# to build a desktop application
thanks for time and help

推荐答案

" xx XX" < xx ****** @ gmail.comwrote in message

news:11 ********************** @ a75g2000cwd .googlegr oups.com ......
"xxxx" <xx******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...

所以任何想法?
so any ideas??



使用filespec作为ListItem的Value属性,并使用文件名

作为ListItem的Text属性。

Use the filespec as the Value property of the ListItem and use the filename
as the Text property of the ListItem.


您是否可以填充Tag Property并从那里读取它?



" xxxx" < xx ****** @ gmail.comwrote in message

news:11 ********************** @ a75g2000cwd .googlegr oups.com ...
Could you not populate the Tag Property and read it from there?



"xxxx" <xx******@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...

大家好,


i需要一些帮助plz :)

我正在构建一个小应用程序,它会在列表框中显示文件夹列表

,但我只想显示文件夹名称而不是

整个路径,所以我从整个路径中取出子串并将它添加到列表框中。

问题是,当用户选择做任何事情时这个

文件,我希望得到整条路径(强制性),但现在我只有

有名字而不是路径。


我做的虚拟解决方案是获取所选索引的索引和

然后从该索引的路径列表中获取路径,但我不喜欢

这样的解决方案,我认为它不专业也不高效。


所以任何想法?


我' M使用VS2003,c#构建桌面应用程序


感谢时间和帮助
Hi all,

i need some help here plz :)
i''m building a small application that will dispaly a list of folders
in a listbox, but i only want to display the folder name rather than
the whole path, so i take the substring from the whole path and add it
to the listbox.
the problem is, later, when the user selects to do anything with this
file, i want to get the whole path back(mandatory), but now i only
have the the name and not the path.

the dummy solution i do, is to get the index of the selected index and
then get the path from teh path list at that index, but i don''t like
such a solution, i think its not professional nor efficient.

so any ideas??

i''m using VS2003, c# to build a desktop application
thanks for time and help



i尝试使用listitem,但它没有定义。

i猜测它仅适用于asp.net应用程序,我正在尝试构建桌面应用程序。
构建一个桌面应用程序。 />

1月30日下午1点29分,Mark Rae < m ... @ markNOSPAMrae.comwrote:
i tried using the listitem, but it was not defined.
i guess its applicable for asp.net applications only, i''m trying to
build a desktop application.

On Jan 30, 1:29 pm, "Mark Rae" <m...@markNOSPAMrae.comwrote:

" xxxx" < xxxxl ... @ gmail.com在messagenews中写道:11 ********************** @ a75g2000cwd.g ooglegroups.com ...
"xxxx" <xxxxl...@gmail.comwrote in messagenews:11**********************@a75g2000cwd.g ooglegroups.com...

所以任何想法??使用filespec作为ListItem的Value属性并使用文件名
so any ideas??Use the filespec as the Value property of the ListItem and use the filename



作为文本ListItem的属性。

as the Text property of the ListItem.


这篇关于需要一个好主意:)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆