VB °æ (¾«»ªÇø)
·¢ÐÅÈË: zhaowei (»¹Öé¸ñ¸ñ), ÐÅÇø: VisualBasic
±ê Ìâ: VB 5.0Ϲ¤¾ßÌõµÄÖÆ×÷Æß
·¢ÐÅÕ¾: ×Ï ¶¡ Ïã (Tue Jun 1 18:12:02 1999), תÐÅ
2.³£Ó÷½·¨
¶ÔToolbarµÄ¿ØÖÆÖ÷ÒªÊÇÕë¶ÔÆäÖеİ´Å¥£¬ToolbarÖеİ´Å¥ÊÇ
×÷Ϊһ¸öÃûΪButtonsµÄ¼¯ºÏ¶ÔÏ󹩳ÌÐò·ÃÎʵġ£ButtonsµÄ³£
Ó÷½·¨°üÀ¨Ôö¼ÓÒ»¸ö°´Å¥(Add)¡¢É¾³ýÒ»¸ö°´Å¥(Remove)ºÍɾ³ý
ËùÓа´Å¥(Clear)¡£
(1)Add
Add·½·¨µÄÓ﷨Ϊ£º
Toolbar¿Ø¼þ
Ãû.Buttons.Add(index,key,caption,style,image)
ÕûÐͲÎÊýindexÖ¸¶¨ÐÂÔö°´Å¥µÄË÷ÒýÖµ£¬¸ÃË÷ÒýÖµÒ²¾ö¶¨ÁË°´Å¥
ÔÚToolbarÖеÄλÖá£index²ÎÊý¿ÉÒÔÊ¡ÂÔ(×¢Ò⣬ʡÂÔindex²Î
ÊýʱÆäºóµÄ¶ººÅÒªÕÕд)£¬È±Ê¡Çé¿öÏÂÐÂÔö°´Å¥¼Óµ½Buttons¼¯
ºÏµÄ×îºó¡£
×Ö·û´®ÐͲÎÊýkeyÖ¸¶¨ÐÂÔö°´Å¥µÄ¹Ø¼ü×Ö£¬¸Ã²ÎÊý¿ÉÒÔÊ¡ÂÔ¡£
×Ö·û´®ÐͲÎÊýcaptionÖ¸¶¨ÐÂÔö°´Å¥µÄ±êÌ⣬¸Ã²ÎÊý¿ÉÒÔÊ¡ÂÔ¡£
ÕûÐͲÎÊýstyleÖ¸¶¨ÐÂÔö°´Å¥µÄStyleÊôÐÔ£¬ÆäºÏ·¨È¡ÖµÓÐ5¸ö£¬
²Î¼ûÇ°ÃæStyleÊôÐԵĽéÉÜ¡£¸Ã²ÎÊý¿ÉÒÔÊ¡ÂÔ£¬È±Ê¡Ê±×Ô¶¯È¡
0(tbrDefault)¡£
²ÎÊýimageÖ¸¶¨¸øÐÂÔö°´Å¥ÔØÈëµÄͼÏó£¬Í¼Ïó±ØÐëÊÇÓë¸Ã
ToolbarÏà¹ØÁªµÄImageList¿Ø¼þͼÏó¿âÖеÄÒ»¸ö¡£image²ÎÊý¿É
ÒÔÊÇÒ»¸öÕûÊý£¬¶ÔÓ¦ImageListͼÏó¿âÖÐij¸öͼƬµÄIndexÖµ£¬
Ò²¿ÉÒÔÊÇÒ»¸ö×Ö·û´®£¬¶ÔӦͼƬµÄ¹Ø¼ü×ÖKey¡£
(2)Remove
Remove·½·¨µÄÓ﷨Ϊ£º
Toolbar¿Ø¼þÃû.Buttons.Remove°´Å¥µÄIndexÖµ
»ò
Toolbar¿Ø¼þÃû.Buttons.Remove°´Å¥µÄKey×Ö·û´®
(3)Clear
Clear·½·¨µÄÓ﷨Ϊ£º
Toolbar¿Ø¼þÃû.Buttons.Clear
ÔÚ³ÌÐòÖÐÉú³ÉToolbar
ÒÔÉÏ´ÓÉè¼Æ½×¶Î(designtime)ºÍ³ÌÐò½Ç¶È½éÉÜÁËToolbarµÄÉú³É
ºÍʹÓá£ÏÂÃæÎÒÃǽáºÏʵÀýÀ´¿´¿´ÈçºÎΪ×Ô¼ºµÄÓ¦ÓóÌÐòÌí¼Ó
¹¦ÄÜÇ¿´ó¡¢·½±ãÓû§µÄ¹¤¾ßÌõ¡£
--
----------------------
%-% Éí ÈË
% * * % ²» ÔÚ
% . % / ÓÉ ½
\\--/ ¼ººþ º
-----------------------
¡ù À´Ô´:£®×Ï ¶¡ Ïã bbs.hit.edu.cn£®[FROM: 202.118.243.47]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º2.375ºÁÃë