字符串在列表中操作 [英] String Manipulating within List

查看:67
本文介绍了字符串在列表中操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是VB的新手(使用VB6)

我有两个列表一个空白,一个包含姓氏名称的名称

然后forename.I还有一个包含forenames的组合框。当我

从我的组合框中选择一个forename我需要添加相应的姓氏

进入空白列表框。这是最好的方法吗?希望这个制作

感觉


TIA


-

欢呼老兄

************

kin?sole

************

解决方案



" Kin?sole" <き****** @ NOSPAMhotmail.com>我写了很多新的VB(使用VB6)
forename.I还有一个包含forenames的组合框。当我从我的组合框中选择一个forename时,我需要在空白列表框中添加相应的姓氏
。最好的方法是什么?希望这个有意义



你是如何构建列表的?组合和列表框都有一个ItemData

属性,在添加名称时可能会有用。发一个小例子

所以我们可以看到你到目前为止所做的......


LFS



----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!

----- ==超过100,000个新闻组 - 19种不同的服务器= -----


最简单的方法就是给我一个例子。

我有一个列表框(lstfullnames)a组合框(cmbforenames)和一个空的
列表框(lstsurnames)


在lstfullnames中是名字史密斯鲍勃。在cmbforenames中是Bob的名字。当

我在组合框中单击Bob时需要查看该名称是否在

lstfullnames列表中,如果是,则将姓氏(Smith)输入到

lstsurname列表框。


" Larry Serflaten" < AB- *** @ SpamBusters.com>在消息中写道

news:40 ********** @ corp.newsgroups.com ...


Kin?sole ; <き****** @ NOSPAMhotmail.com>写了

我是VB的新手(使用VB6)
我有两个列表,一个空白,一个包含名称,格式为
surname,然后forename.I还有一个包含forenames的组合框。当我从我的组合框中选择一个forename时,我需要在空白列表框中添加相应的
姓。最好的方法是什么?希望这个有意义

你是如何构建列表的?组合和列表框都有一个ItemData
属性,在添加名称时可能会有用。发布一个小的



示例,这样我们就能看到你到目前为止所做的......

LFS


----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!
----- ==超过100,000个新闻组--19个不同的服务器! = -----



你错过了这一点。如果您向我们展示了您尝试过的
,您将了解更多信息,以便我们在您处理

代码时发表评论并理顺您。只是递给你答案不会教你任何东西。我们理解你想要什么,现在让我们看看你为了达到

结果而尝试的来源。


-


Randy Birch

MVP Visual Basic
http://vbnet.mvps.org/

请只回复新闻组,以便所有人都能受益。

Kin?sole <き****** @ NOSPAMhotmail.com>在消息中写道

news:b2 ****************************** @ news.teranew s。 com ...

:最简单的事情就是给我一个例子。

:我有一个列表框(lstfullnames)一个组合框(cmbforenames)和一个空的

:列表框(lstsurnames)



:在lstfullnames中是名字史密斯鲍勃。在cmbforenames中是Bob的名字。



:我点击组合框中的Bob需要查看名称是否在
$ b $中b:lstfullnames列表,如果是,则输入姓氏(Smith)进入

:lstsurname列表框。



:" Larry Serflaten < AB- *** @ SpamBusters.com>在消息中写道

:news:40 ********** @ corp.newsgroups.com ...

:>

:> "健鞋底" <き****** @ NOSPAMhotmail.com>写了

:>

:> >我是VB的新手(使用VB6)

:> >我有两个列表一个空白,一个包含名称格式为

:姓氏

:> >然后forename。我还有一个包含forenames的组合框。当我

:> >从我的组合框中选择一个名字我需要添加相应的

:姓氏

:> >进入空白列表框。这是最好的方法吗?希望这个

make

:> >感觉

:>

:>

:>你是如何建立清单的?组合和列表框都有一个

ItemData

:>添加名称时可能有用的属性。发布一个小的

:示例

:>所以我们可以看到你到目前为止......

:>

:> LFS

:>

:>

:>

:>

:> ----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----

:> http://www.newsfeeds.com - 世界排名第一的新闻组服务!

:> ----- ==超过100,000个新闻组 - 19个不同的服务器! = -----





Hi
I''m very new to VB (using VB6)
I have two lists one blank and one containing names in the format of surname
and then forename.I also have a combo box containing forenames.When I
select a forename from my combo box I need to add the corresponding surname
into the blank list box.What is the best way to do this? hope this make
sense

TIA

--
cheers dude
************
kin?sole
************

解决方案


"Kin?sole" <ki******@NOSPAMhotmail.com> wrote

I''m very new to VB (using VB6)
I have two lists one blank and one containing names in the format of surname
and then forename.I also have a combo box containing forenames.When I
select a forename from my combo box I need to add the corresponding surname
into the blank list box.What is the best way to do this? hope this make
sense


How did you build the lists? The combo and listbox both have an ItemData
property that may be of use when you are adding names. Post a small example
so we can see what you''ve got so far....

LFS


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


The easiest thing is for me to give you an example.
I have a list box (lstfullnames) a combo box (cmbforenames) and an empty
list box (lstsurnames)

In lstfullnames is the name Smith Bob. In cmbforenames is the name Bob. When
I click on Bob in the combo box in need to see if the name is in the
lstfullnames list and if it is then enter the surname (Smith) into the
lstsurname list box.

"Larry Serflaten" <Ab***@SpamBusters.com> wrote in message
news:40**********@corp.newsgroups.com...


"Kin?sole" <ki******@NOSPAMhotmail.com> wrote

I''m very new to VB (using VB6)
I have two lists one blank and one containing names in the format of surname and then forename.I also have a combo box containing forenames.When I
select a forename from my combo box I need to add the corresponding surname into the blank list box.What is the best way to do this? hope this make
sense

How did you build the lists? The combo and listbox both have an ItemData
property that may be of use when you are adding names. Post a small


example so we can see what you''ve got so far....

LFS


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----



You''re missing the point. You will learn more if you show us what you''ve
attempted so we can comment and straighten you out in your handling of the
code. Just handing you an answer won''t teach you anything. We understand
what you want, now let''s see the source you''ve tried in order to achieve the
result.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Kin?sole" <ki******@NOSPAMhotmail.com> wrote in message
news:b2******************************@news.teranew s.com...
: The easiest thing is for me to give you an example.
: I have a list box (lstfullnames) a combo box (cmbforenames) and an empty
: list box (lstsurnames)
:
: In lstfullnames is the name Smith Bob. In cmbforenames is the name Bob.
When
: I click on Bob in the combo box in need to see if the name is in the
: lstfullnames list and if it is then enter the surname (Smith) into the
: lstsurname list box.
:
: "Larry Serflaten" <Ab***@SpamBusters.com> wrote in message
: news:40**********@corp.newsgroups.com...
: >
: > "Kin?sole" <ki******@NOSPAMhotmail.com> wrote
: >
: > > I''m very new to VB (using VB6)
: > > I have two lists one blank and one containing names in the format of
: surname
: > > and then forename.I also have a combo box containing forenames.When I
: > > select a forename from my combo box I need to add the corresponding
: surname
: > > into the blank list box.What is the best way to do this? hope this
make
: > > sense
: >
: >
: > How did you build the lists? The combo and listbox both have an
ItemData
: > property that may be of use when you are adding names. Post a small
: example
: > so we can see what you''ve got so far....
: >
: > LFS
: >
: >
: >
: >
: > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
: > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
: > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
:
:


这篇关于字符串在列表中操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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