Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
技术板块灌水区
» 关于Tcalss=class(Aclass.AAclass)问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 关于Tcalss=class(Aclass.AAclass)问题
jxydhzw
普通灌水员
UID 3904
Digest Posts
1
Credits 64
Posts 19
点点分 64
Reading Access 10
Registered 2006-12-26
Status Offline
#1
Post at 2008-6-18 20:22
Profile
|
Blog
|
P.M.
关于Tcalss=class(Aclass.AAclass)问题
我记得不知道是在这个版块看到还是在哪个版块看到的..有这么一种写法..关于 =class(Aclass.AAclass)的写法..但是不是很清楚..不知道是否有这种写法...本人现在在写一个小东东..TComboBox应为就只有一个Items值..只能记住选 中的值..而小弟现在想实现 当TComboBox选中某个项时..自然就知道其选中的内容,,但是也想知道对应选中的内容所关联的内容 ...比如 :
编码 名称
001 男
002 女
我的思路是这样..分别将编码和名称存入二个TstringList当中..即AList存入编码数组...BList存入名称数组..然后将此二个TstringList关联至TComboBox..当TComboBox选项变动时,比如将选项男变为女时..后台自动将女对应的编码改成对应的AList中002的Index值...
想到这时..我突然想到 好像有关于 =class(Aclass.AAclass)的写法... 想写个类型这样的控件..但是只是替换掉原来的TComboBox,,而不必重新写个TComboBox控件,,再安装.....
不知道是否有人记得这种写法...还有..我这个方案可行否?如果不行..请高人支个新招.....
我的QQ是5596771
bahamut8348
灌水司司长
UID 4743
Digest Posts
14
Credits 337
Posts 79
点点分 337
Reading Access 10
Registered 2007-1-18
Status Offline
#2
Post at 2008-6-18 20:26
Profile
|
Blog
|
P.M.
当然有这种写法,这个意思其实就是
你的类名=class(单元名.类名)
也就是指定你的类是继承自哪个单元中的类,有时候我们定义变量也有
var
hWnd: Windows.HWND;
这样的写法,一个道理
做人要厚道,看帖要回贴
jxydhzw
普通灌水员
UID 3904
Digest Posts
1
Credits 64
Posts 19
点点分 64
Reading Access 10
Registered 2006-12-26
Status Offline
#3
Post at 2008-6-19 10:42
Profile
|
Blog
|
P.M.
明白了.谢谢
daxian
普通灌水员
UID 19298
Digest Posts 0
Credits 64
Posts 4
点点分 64
Reading Access 10
Registered 2007-7-3
Status Offline
#4
Post at 2008-8-5 21:39
Profile
|
Blog
|
P.M.
你要的是 Tobj = helper of TComboBox
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-22 05:48
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.007648 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats