«á¤@­¶
«e¤@­¶
¦^¥Ø¿ý
¦^­º­¶
²Ä¤Q¤»³¹ ¼Æ¾ÚÂsÄý³¡¥óªºÀ³¥Î¤Îµ{¦¡³]­p¡]¤G¡^

¦bTDBGrid³¡¥ó¤¤Åã¥Ü¸ê®Æ®wªí¤¤ªº°O¿ý¸ê°T®É¡A¦pªGTDBGrid¨Ï¥Î¼Æ¾Ú¶°³¡¥ó¦b°õ¦æ¹Lµ{¤¤°ÊºA²£¥ÍªºÄæ¦ì³¡¥ó®É¡ATDBGridÅã¥Ü¸ê®Æ®wªí¤¤ªº°O¿ý¬O«öªí¤¤°O¿ýªº¯Ê¬Ù¶¶§Ç©MÄæ¦ìªº¯Ê¬Ù¶¶§ÇÅã¥Üªí¤¤ªº°O¿ý¸ê°T¡A¦Ó¥B­nÅã¥Üªí¤¤¦U­Ó°O¿ýªº¥þ³¡Äæ¦ìªº­È¡C¦Ó¦b¤j¦h¼Æ±¡ªp¤U¡A¥Î¤á¥i¯à§Æ±æ«ö¦Û¤v³ßÅwªºÄæ¦ì¶¶§ÇÅã¥Ü°O¿ýªº¦U­ÓÄæ¦ì¡A¦³®ÉÁ٧Ʊæ¥uÅã¥Ü°O¿ýªº³¡¤ÀÄæ¦ì­È¡A­n¹F¨ì³o¤@¥Øªº¡A¥²¶·¦b³]­p¶¥¬q¨Ï¥ÎÄæ¦ì½s¿è¾¹¨Ó«Ø¥ß¥Ã¤[©ÊªºÄæ¦ì³¡¥ó¡A¨Ã¥BÁÙ­n³]©w¦U­ÓÄæ¦ì³¡¥ó¦³ÃöªºÄÝ©Ê¡C

·í¨Ï¥ÎÄæ¦ì½s¿è¾¹(Fields Editor)«Ø¥ß¥Ã¤[©ÊªºÄæ¦ì³¡¥ó´£¨Ñµ¹TDBGrid³¡¥ó¨Ó¨Ï¥Î®É¡A§Ú­Ì¥i¥H¦bTDBGrid³¡¥ó¤¤§óÆF¬¡¦aÅã¥Ü¸ê®Æ®wªí¤¤ªº°O¿ý¸ê°T¡C¨Ò¦p¦bÄæ¦ì½s¿è¾¹¤¤ªºFields¦C¥Ü¤è¶ô¤¤§Ú­Ì¥i¥H³]©wÄæ¦ì³¡¥óªºÅã¥Ü¶¶§Ç¡A¦b³]©w¦nÄæ¦ìªºÅã¥Ü¶¶§Ç¤§«á¡ATDBGrid³¡¥ó«K«ö³o­Ó¶¶§ÇÅã¥Ü°O¿ýªº¦U­ÓÄæ¦ì­È¡A·í§Ú­Ì³]©wÄæ¦ì³¡¥óªºDisplayFormat©MEditFormatÄݩʤ§«á¡A¦bTDBGrid³¡¥ó¤¤«K¬ÛÀ³¦a¥H³]©wªºÅ㦡©M½s¿è®æ¦¡Åã¥ÜÄæ¦ì­È©M½s¿èÄæ¦ì­È¡F·í³]©w¬Y¤@­ÓÄæ¦ì³¡¥óªºRequiredÄݩʬ°True®É¡A·í´¡¤J¤@±ø·s°O¿ý®É¡A¥²¶·­n¬°¸ÓÄæ¦ì¿é¤J¬ÛÀ³ªºÄæ¦ì­È¡A§_«h·|¥X¿ù¡F³q¹L³]©wÄæ¦ì³¡¥óªºVisibleÄÝ©Ê¡A¥i¥H½T©w¬ÛÀ³ªºÄæ¦ì­È¬O§_¦bTDBGrid¸s¸s¤¸¥ó¤¤Åã¥Ü¡C¦³Ãö¨Ï¥ÎÄæ¦ì½s¿è¾¹¨Ó«Ø¥ßÄæ¦ì³¡¥ó¡A³]©wÄæ¦ì³¡¥óªºÄݩʽаѬÝ3.6.2¸`¡C¡@

16.4.1 TDBGrid³¡¥óªº¥D­nÄݩʤÎÀ³¥Î¡@

TDBGrid³¡¥ó¬O¥Î©óÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªº°O¿ý¸ê°Tªº­«­n³¡¥ó¡A¥¦¬O§Ú­Ì¦bµ{¦¡³]­p¹Lµ{·í¤¤­n¸g±`¨Ï¥Îªº¡BÆF¬¡¦a¥Î©óÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªº°O¿ý¸ê°Tªº¤@­Ó±j¦³¤Oªº¤u¨ã¡CTDBGrid¨ã¦³«Ü¦h­«­nªºÄÝ©Ê¡A§Ú­Ì¥i¥H¦bµ{¦¡³]­p¶¥¬q©Mµ{¦¡°õ¦æ¹Lµ{¤¤¶i¦æ³]©w¡CTDBGrid³¡¥óªº¤@¨Ç­«­nÄݩʤΨä³]©w¤èªk½Ð°Ñ¬Ý³s½u»²§U±Ô­z¤å¥ó¡CTDBGrid³¡¥ó¤¤¤@¨Ç­«­nªºÄݩʬOOptionÄÝ©Ê¡BDrawModeÄÝ©Ê©MDefaultDrawingÄÝ©Ê¡A§Ú­Ì­«ÂI¹ï¨â­ÓÄݩʶi¦æÄÄ­z¡C

OptionsÄÝ©Ê¡G¥¦¬OTDBGrid³¡¥óªº¤@­ÓÂX®iÄÝ©Ê¡A¦bµ{¦¡³]­p¶¥¬q³]©wOptionsÄÝ©Ê¥i¥H±±¨îTDBGrid³¡¥óªºÅã¥Ü¯S©Ê©M¹ï¨Æ¥óªºÅTÀ³¯S©Ê¡COptionsÄݩʦbTDBGrid³¡¥óªºÄÝ©ÊÄ椤Åã¥Ü®É¡A¥¦ªº«e­±±a¦³¤@­Ó¡§¡Ï¡¨¼Ð»x¡A³sÄò«ö¨â¤U¡§¡Ï¡¨¼Ð»x¡A«K¥i¥H®i¶}¤@­Ó¥¬º¸«¬ÄݩʲM³æ¡A¥Î¤á¥i¥H³v­Ó¦a­×§ï¨ä¤¤ªº¦U­ÓÄÝ©Ê­È¡A­×§ï§¹²¦«á¥i¥H³sÄò«ö¨â¤UOptionsÄÝ©Ê«eªº¡§¡Ð¡¨¼Ð»x¡A¨ÏTDBGrid³¡¥óªºÄݩʲM³æ«ì´_¨ì­ì¨ÓªºÅã¥Üª¬ºA¡C

ªí16.5¦C¥X¤FOptionsÄݩʤ¤¥]§tªº©Ò¦³ªºÂX®iÄݩʶµ¥H¤Î¥¦­Ì¹ïTDBGrid³¡¥óªº¼vÅT¡C¡@

ªí16.5 TDBGrid³¡¥óªºOptionsÄݩʤ¤ªºÂX®iÄݩʶµ

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

ÄÝ ©Ê ¦W ¨ú ­È ¤Î ¼v ÅT

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dbEditing True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡A½T«O¥Î¤á¯à°÷¦bºô®æ¤¤½s¿è´¡

¤J©M¸Ñ°£¸ê®Æ®wªí¤¤ªº°O¿ý

False:¦bºô®æ¤¤¤£¯à½s¿è¡B´¡¤J©M¸Ñ°£ªí¤¤ªº°O¿ý

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dbAlwaysShow True: ·í¥Î¤á¿ï¤¤°O¿ý¤¤ªº¤@­ÓÄæ¦ì®É¡A¦Û°Ê¦a¨Ï¸ÓÄæ¦ì

Editor ³B©ó½s¿èª¬ºA

False:¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C·í¤@­ÓÄæ¦ì³Q¿ï¤¤¡A¥¦¤£¯à

¦Û°Ê¦aÅܦ¨½s¿èª¬ºA

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgTitles True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¦bºô®æªº²Ä¤@¦æ¤¤Åã¥ÜÄæ¦ì¦W

©ÎÄæ¦ì¼ÐÃD

False:¦bºô®æ¤¤¤£Åã¥ÜÄæ¦ì¦W©ÎÄæ¦ì¹ïÀ³ªº¼ÐÃD

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgIndicator True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¦bºô®æªº³Ì¥ªÃä¥Î¤@­Ó¶Â½bÀY

¼Ðª`¥Ø«e°O¿ý«ü¼Ð©Ò¦bªº¦ì¸m¡A¦b´¡¤Jª¬ºA®É¡A½b

ÀYÅܦ¨¬Pª¬¡A¦b½s¿èª¬®É¡A½bÀYÅܦ¨"I"ÀY¡C

False:¦bºô®æ¤¤¤£¼ÐÃѥثe°O¿ý«ü¼Ðªº¦ì¸m

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgColumnResize True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C³q¹L©ì©Ôºô®æªº««ª½¤À¹j½u¥i

¥H§ïÅܺô®æ¤¤¦U¦Cªº¼e«×¡A¦b¨ãÅé¾Þ§@®É­n©ì©Ô¦U

¦C¤¤Åã¥ÜÄæ¦ì¼ÐÃD°ÏÄæ¦ì¤¤ªº««ª½¤À¹j½u¡C

False:ºô®æ¤¤¦U¦Cªº¼e«×¤£¯à§ïÅÜ

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgCloLines True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¦bºô®æ¤¤Åã¥Ü¦U¦C¤§¶¡ªº««ª½

¤À¹j½u¡C

False:¦bºô®æ¤¤¤£Åã¥Ü««ª½¤À¹j½u

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgRowLines True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¦bºô®æ¤¤Åã¥Ü¦U¦æ¤§¶¡ªº¤ô·Ç

¤À¹j½u¡C

False:¦bºô®æ¤¤¤£Åã¥Ü¤ô·Ç¤À¹j½u¡C

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgTabs True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¥i¥H¦b°O¿ýªº¦UÄæ¦ì¤§¶¡²¾°Ê

¿é¤JµJÂI(¤]§Y¿ï¾Ü´£¥Ü´Î)

False:¤£¯à¦b°O¿ýªº¦WÄæ¦ì¤§¶¡²¾°Ê¿é¤JµJÂI¡A¦bºô®æ¤¤

«öTabÁä®É¡Aª½±µ¸õ¥Xºô®æ

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgRowSelect True: ¿ï¾Ü´£¥Ü´ÎÂл\¾ã±ø°O¿ý¤¤ªº¥þ³¡Äæ¦ì

False:¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¿ï¾Ü´£¥Ü´Î¤@¦¸¥uÂл\°O¿ý¤¤

ªº¤@­ÓÄæ¦ì

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dgAlwaysShow True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C¦bºô®æ©l²×Åã¥Ü¿ï¾Ü´£¥Ü´Î¡A§Y

-Selection ¨Ï¨ä±±¥óÀò±oµJÂI®É¡A¤]¬O¦p¦¹¡C

False:¥u¦b·íºô®æÀò±oµJÂI®É¡A¤~Åã¥Ü¿ï¾Ü´£¥Ü´Î¡C

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

dbConfirmDelete True: ¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡C·í¦bºô®æ¤¤¸Ñ°£°O¿ý®É¡A¼u¥X½T

»{¸ê°T¡C

False:¦bºô®æ¤¤¸Ñ°£°O¿ý®É¤£¼u¥X½T»{¸ê°T¡C

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

¡@

¥Î¤á·Q¤F¸Ñ³o¨Ç¥i¿ïÄݩʶµªº§@¥Î©M¼vÅT¡AÁÙ¥i¥H°Ñ¬Ý³s½u»²§U±Ô­z¸ê°T¡C

DragModeÄÝ©Ê¡G¸ÓÄݩʦ³¨â­Ó¥i¿ïªºÄÝ©Ê­È¡C·í¥¦ªº­È³Q³]©w¬°dmManual®É¡A¦bÀ³¥Îµ{¦¡°õ¦æ¹Lµ{¤¤¡A¥Î¤á¥i¥H¥Î·Æ¹«©ì©ñºô®æ¤¤ªº¦U¦C¡A§ïÅܦU¦C¦bºô®æ¤¤ªºÅã¥Ü¶¶§Ç©M¦ì¸m¡C·í¥Î·Æ¹«©ì©ñºô®æ¤¤ªº¤@¦C¡B§ïÅÜ¥¦¦bºô®æ¤¤ªº¦ì¸m®É¡A¥u¬O§ïÅܤF¸Ó¦C¦b¼Æ¾Ú¶°¤¤ªº¦ì¸m¡A¨Ã¨S¦³§ïÅÜ¥¦¹ïÀ³ªº¸ê®Æ®wªí¤¤ªº¦ì¸m¡C·í¸ÓÄݩʪº­È³Q³]©w¦¨dmAutomatic®É¡A¥Î¤á¤£¯à¥Î·Æ¹«©ì©ñºô®æ¤¤ªº¦U¦C¦Ó§ïÅÜ¥¦¦bºô®æ¤¤ªº¦ì¸m¡C

DefalultDrawingÄÝ©Ê¡G¸ÓÄݩʬO¥¬º¸«¬ÄÝ©Ê¡A¥¦¥Î©ó±±¨îºô®æ¤¤¦Uºô®æ³æ¤¸ªºÃ¸¨î¤è¦¡¡C¦b¯Ê¬Ù±¡ªp¤U¡A¸ÓÄݩʪº­È¬°True¡A¤]´N¬O»¡Delphi¨Ï¥Îºô®æ¥»¨­¯Ê¬Ùªº¤èªkø¨îºô®æ¤¤¦Uºô®æ³æ¤¸¡A¨Ã¶ñ¥R¦Uºô®æ³æ¤¸¤¤ªº¤º®e¡A¦Uºô®æ³æ¤¸¤¤ªº¼Æ¾Ú®Ú¾Ú¨ä¹ïÀ³ªºÄæ¦ì³¡¥óªºDisplayFormatÄÝ©Ê©MEidtFormatÄݩʶi¦æÅã¥Ü©Mø¨î¡C¦pªGDefaulDrawingÄݩʳQ³]©w¬°False®É¡ADelphi¤£·|¦Û°Ê¦aø¨îºô®æ¤¤¦Uºô®æ³æ¤¸©Mºô®æ³æ¤¸¤¤ªº¼Æ¾Ú¡A¥Î¤á¥²¶·¦Û¤v¬°TDBGrid³¡¥óªºOnDrawDataCell¨Æ¥ó½s¼g¬ÛÀ³ªºµ{¦¡¥Î©óø¨î¦Uºô®æ³æ¤¸©M¨ä¤¤ªº¼Æ¾Ú¡C

¦b¤F¸Ñ¤FTDBGrid³¡¥óªº¦U­ÓÄݩʤ§«á¡A§Ú­Ì«K¥i¥H¨Ï¥ÎTDBGrid³¡¥ó¨ÓÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªº¼Æ¾Ú¤F¡C¹Ï16.5©Ò¥ÜªºÀ³¥Îµ¡Å餤¦U³¡¥óªºÄݩʳ]©w¦pªí16.6©Ò¥Ü¡C

¡@

ªí16.6 ¦U³¡¥óªºÄݩʳ]©w

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

ÄÝ ©Ê ¦W ÄÝ ©Ê ­È

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

Table1.DatabaseName DEMOS

Table1.TableName Customer.DB

Table1.CanModify True

DataSource1.DataSet Table1

DataSource1.AutoEdit True

DBGrid1.Datasource DataSource1

DBGrid1.ReadOnly False

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

¡@

¦b¨ä¥L¼Æ¾ÚÂsÄý³¡¥ó(¦pTDBEdit)¤¤½s¿è­×§ï¨ä¤¤ªº¤º®e®É¡A¥u­n¥Î¤á¥ÎTabÁä©Î·Æ¹«±NµJÂI²¾¨ì¨ä¥L³¡¥ó®É¡A¥Î¤á¹ï¸ÓÄæ¦ìªº­×§ï·|¦Û°Ê¦a¼g¦^¨ì¸ê®Æ®wªí¤¤¡A¨Ï¥ÎTDBGrid³¡¥ó½s¿è­×§ï¸ê®Æ®wªí®É¡ADelphi¬O¥H°O¿ý¬°°ò¥»³æ¦ì±N­×§ï¼g¦^ºÏºÐ¤Wªº¸ê®Æ®wªíªº¡C¥Î¤á¦b½s¿è©M­×§ïªí¤¤ªº¥Ø«e°O¿ý®É¡A¥u¦³¥Î¤á±N°O¿ý«ü¼Ð²¾¨ì¨ä¥Lªº°O¿ý®É¡ADelphi¤~±N¥Î¤á¹ï¥Ø«e°O¿ýªº­×§ï¼g¦^¨ìºÏºÐ¤Wªº¸ê®Æ®wªí¡A§_«h¡A¥Î¤á§Y¨Ï§ïÅܵJÂI¨ìµ¡Å餤ªº¨ä¥L³¡¥ó¡ADephi¤]¤£·|§ë±H¥Î¤á¹ï¥Ø«e°O¿ýªº­×§ï¡CDelphi¦b¦V¸ê®Æ®wªí§ë±HTDBGrid³¡¥ó¤¤ªº³Q­×§ïªº°O¿ý®É¡A¥¦·|¦Û°Ê¦aÀˬd©Ò¦³»P¥Ø«e¸ê®Æ®w¬Û³sªº¼Æ¾ÚÂsÄý³¡¥óªºª¬ºA¡A¥u­n¨ä¤¤¦³¥ô¦ó¤@¼Æ¾ÚÂsÄý³¡¥ó¥¿¦b­×§ï¼Æ¾Ú¡A³o®É·|¼u¥X¥X¿ù¸ê°T¡A¨Ã¥B¥Ø«e°O¿ýªº­×§ï¤£·|³Q§ë±H(§Y³Q¼g¦^ºÏºÐ¤Wªº¸ê®Æ®wªí)¡C

¡@

16.4.2 TDBGrid³¡¥óªº¨Æ¥ó¤ÎÀ³¥Î

¡@

TDBGrid³¡¥ó¦b¨ã¦³«Ü¦h­«­nÄݩʪº¦P®É¡ADelphi¤]¬°¥¦½á¤©¤F¤@¨Ç¨Æ¥ó¡A¥H¥Î©ó±±¨î¥Î¤á¦bTDBGrid³¡¥ó¤¤ªº¾Þ§@¡A§Ú­Ì³q¹L¬°¨ä¤¤ªº¤@¨Ç¨Æ¥ó½s¼g³B²zµ{¦¡¡A¥i¥H¦³®Ä¦a±±¨îTDBGrid³¡¥óªº¦æ¬°¡C¦]¬°¦bTDBGrid³¡¥ó¤¤¤@¦¸¬OÅã¥Ü¦h±ø°O¿ý©M°O¿ý¤¤ªº¦h­ÓÄæ¦ì¡A¤]³\¦b¹ê»ÚÀ³¥Î¤¤¡A¤£¦Pªº¥Î¤á¦U¦³¦Û¤v¯S®íªº»Ý­n¡A¦p¥u·Q§ïÅܨ䤤¬Y¤@¦Cªº­È©ÎªÌ±±¨î¥Î¤á¨C¦¸¥u¯à¶i¥Xºô®æ¤¤«ü©wªº¦Cµ¥µ¥¡Cªí16.7¦C¥X¤FTDBGrid³¡¥óªº¥D­n¨Æ¥ó¤Î¥Øªº¥Î³~¡C

¡@

ªí16.7 TDBGrid³¡¥ó¤¤ªº¥D­n¨Æ¥ó

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

¨Æ ¥ó ¦W ¥Ø ªº ¥Î ³~

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

OnColEntor ·í¥Î¤á¶i¤Jºô®æ¦U¦C®É¡AIJµo¸Ó¨Æ¥ó

OnColExit ·í¥Î¤áÂ÷¶}ºô®æ¦U¦C®É¡AIJµo¸Ó¨Æ¥ó

OnDblClick ·í¥Î¤á¦bºô®æ¤¤³sÄò«ö¨â¤U·Æ¹«¥ªÁä®É¡AIJµo¸Ó¨Æ¥ó

OnDragDrop ·í¥Î¤á¦bºô®æ¤¤¥Î·Æ¹«¶i¦æ©ì©ñ¾Þ§@®É¡AIJµo¸Ó¨Æ¥ó

OnDragOver ·í¥Î¤á¦bºô®æ¤¤¥Î·Æ¹«©ì°Êºô®æ®É¡AIJµo¸Ó¨Æ¥ó

OnDrawDataCell ¥Î©ó©w¨îø¨îºô®æ¤¤¦Uºô®æ³æ¤¸¡A·í¦Vºô®æ¤¤¶ñ¥R¼Æ

¾Ú®ÉIJµo¸Ó¨Æ¥ó

OnEndDrag ·í¥Î¤á°±¤î©ì°Êºô®æ®É¡AIJµo¸Ó¨Æ¥ó

OnEnter ·íºô®æÀò±oµJÂI®É¡AIJµo¸Ó¨Æ¥ó

OnExit ·íºô®æ¥¢¥hµJÂI®É¡AIJµo¸Ó¨Æ¥ó

OnKeyDown ·í¥Î¤á¦bºô®æ¤¤«ö¤U¥ô¦óÁä©Î¸s¸s²Õ¦XÁä®É¡AIJµo¸Ó¨Æ¥ó

OnKeyPress ·í¥Î¤á¦bºô®æ¤¤«ö¤F¥ô¦ó¤@­Ó¼Æ¦rÁä©Î¦r¥ÀÁä®É¡AIJ

µo¸Ó¨Æ¥ó

OnKeyUp ·í¥Î¤á¦bºô®æ¤¤ÄÀ©ñ¥ô¦ó³Q«ö¤UªºÁä®É¡AIJµo¸Ó¨Æ¥ó

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

¡@

¤W­z³o¨Ç¨Æ¥ó¦b§Ú­Ì¶}µo¹ê»ÚªºÀ³¥Îµ{¦¡®É¡A¬O«Ü¦³¥Î³Bªº¡AŪªÌ­Ì¥i¥H¥J²Ó¦a¬ã¨s³o¨Ç¨Æ¥óªº¥Î³~¡A¨Ã°Ñ¬Ý³s½u»²§U±Ô­z¸ê°T¡C

¨Ò¦p¡A§Ú­Ì¥i¥H¬°TDBGrid³¡¥óªºOnDblClick¨Æ¥ó½s¼g³B²zµ{¦¡¡A·í¥Î¤á¦bºô®æ¤¤³sÄò«ö¨â¤U·Æ¹«¥ªÁä®É¡A¼u¥X¤@­Ó¦C¥Ü¤è¶ô¨Ñ¥Î¤á¬°ºô®æ¤¤¬Y¤@¦C¿ï¾Ü¤@­ÓÄæ¦ì­È¡C¦b¨Ò16.1¤¤§Ú­Ì«Ø¥ß¦p¹Ï16.5©Ò¥ÜªºÀ³¥Î¡A¦bObject Inspector¤¤³]©w¦UÄæ¦ì³¡¥óªºVisibleÄÝ©Ê¡A¦bºô®æ¤¤¥uÅã¥ÜCustNo¡BCompany¡BCountry©MCityÄæ¦ì¡C§Ú­Ì¬°DBGrid½s¼gOnDblclick¨Æ¥ó³B²z¹Lµ{¡A·í¥Î¤á½s¿è­×§ïCountryÄæ¦ì®É¡A³sÄò«ö¨â¤U·Æ¹«¥ªÁä«K¼u¥X¤@­Ó¦C¥Ü¤è¶ôListBox1¡A¨ä¤¤Åã¥Ü¡§¤¤°ê¡¨¡B¡§¬ü°ê¡¨¡B¡§¤é¥»¡¨¡B¡§­^°ê¡¨¡B¡§ªk°ê¡¨¡B¡§«Xù´µ¡¨¨Ñ¥Î¤á¿ï¾Ü¡A¥Î¤á«ö¤@¤U¨ä¤¤ªº°ê®a¼Ðñ«á¡A±N¬ÛÀ³ªº¬w¦W¿ï¤Jºô®æ¤¤¡C¡@

¨ä¤¤ListBox1ªºItemsÄݩʼg¤J¤W­z°ê®aªº¼Ðñ¡A¨Ã¥B³]©w¨äVisibleÄݩʬ°False¡C

6.5 TDBNavigator³¡¥ó¤Î¨äÀ³¥Î¡@

TDBNavigator ³¡¥ó¥D­n¥Î©ó¦b¼Æ¾Ú¶°¤¤¶i¦æ°O¿ý¾É¯è©M¬°¥Î¤á¾ÞÁa¼Æ¾Ú¶°¤¤ªº°O¿ý´£¨Ñ¤F¤@¸s¸s²Õ²³æ©ú¤Fªº±±¨î«ö¶s¡CTDBNavigator³¡¥ó¤¤¥]§t¤@¸s¸s²Õ±±¨î«ö¶s¡A¥Î¤á«ö¤@¤U¨ä¤¤ªº«ö¶s¥i¥H¦V«e¦V«á²¾°Ê°O¿ý«ü¼Ð¡B´¡¤J°O¿ý¡B­×§ï²{¦s°O¿ý¡B§ë±H¹ï°O¿ýªº­×§ï¡B¨ú®ø­×§ï¡B¸Ñ°£°O¿ý¡F¥H¤Î¨ê·s°O¿ýªºÅã¥Üµ¥¡C

¹Ï16.7¬°TDBNavigator³¡¥ó¤¤ªº±±¨î«ö¶s¡C¡@

¤Uªí´y­z¤FTDBNavigator³¡¥ó¤¤ªº¦U­Ó±±¨î«ö¶s¡C¡@

ªí16.8 TDBNavigator³¡¥ó¤¤ªº±±¨î«ö¶s

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

«ö¶s¼Ðñ ¥D ­n ¥\ ¯à

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

First ±N¥Ø«e°O¿ý«ü¼Ð²¾¨ì¸ê®Æ®wªí¤¤²Ä¤@±ø°O¿ý³B

Prior ±N°O¿ý«ü¼Ð²¾¨ì¥Ø«e°O¿ýªº«e¤@±ø°O¿ý³B

Next ±N°O¿ý«ü¼Ð²¾¨ì¥Ø«e°O¿ýªº«á¤@±ø°O¿ý³B

Last ±N¥Ø«e°O¿ý«ü¼Ð²¾¨ì¸ê®Æ®wªí¤¤³Ì«á¤@±ø°O¿ý³B

Insert ©I¥s¼Æ¾Ú¶°³¡¥óªºInsert¤èªk¡A¦b¥Ø«e°O¿ýªº«e­±

´¡¤J¤@±ø·s°O¿ý¡A¨Ã±N¼Æ¾Ú¶°³¡¥ó¸m¬°´¡¤Jª¬ºA

Delete ¸Ñ°£¥Ø«e°O¿ý¡A¦pªGTDBNavigator³¡¥óªºConfirmDelete

Äݩʳ]©w¬°true®É¡A·|¼u¥X¸Ñ°£½T»{¹ï¸Ü¤è¶ô

Edit ±N¼Æ¾Ú¶°³¡¥ó¸m¬°½s¿èª¬ºA¡A¥H«K¥Î¤á­×§ï¥Ø«eªº°O¿ý

Post §ë±H¹ï¥Ø«e°O¿ýªº­×§ï

Cancel ¨ú®ø¹ï¥Ø«e°O¿ýªº­×§ï¡A¨Ã±N¼Æ¾Ú¶°³¡¥ó¸m¬°ÂsÄýª¬ºA

Refresh ²M°£¼Æ¾ÚÂsÄý³¡¥óªºÅã¥Ü½w½Ä°Ï¡A¨Ã¥Î»P¨ä¬Û³sªº¼Æ¾Ú

¶°³¡¥ó(TTable©ÎTQuery)¤¤ªº°O¿ý¨ê·sÅã¥Ü½w½Ä°Ï¡C

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

¡@

TDBNavigator³¡¥óªºÄݩʸû¤Ö¡C¤U­±§Ú­Ì§@¤@²³æªº¤¶²Ð¡GTDBNavigator³¡¥óªº¤@­Ó­«­nÄݩʬOVisibleButtonsÄÝ©Ê¡A¸ÓÄݩʤ¤¥]§tµÛ¦h­Ó¥i¿ïªºÂX®i¤lÄÝ©Ê¡A¥D­n¥Î©ó¿ï¾ÜTDBNavigator³¡¥ó¤¤¦U­Ó±±¨î«ö¶sªºÅã¥Ü»P§_ªº¡C¦]¬°¦b¹ê»ÚªºÀ³¥Î·í¤¤¡A§Ú­Ì¨Ã¤£»Ý­n¨º»ò¦hªº±±¨î«ö¶s¡C¦p¦b¤@­ÓÂsÄý¸ê®Æ®wªíªºÀ³¥Î¤¤¡A§Ú­Ì¤@¯ë¥u»Ý­nFirst¡BPrior¡BNext¡BLast¥|­Ó«ö¶s´N¦æ¤F¡A¨º»ò§Ú­Ì«K¦bVisibleButtonsÄݩʤ¤³]©w¨ä¥¦ªº«ö¶s¬°False§Y¥i¡C

ShowHintÄÝ©Ê¡G¸ÓÄݩʬO¥¬º¸«¬ÄÝ©Ê¡A¥¦¥Î©ó±±¨î¬O§_Åã¥ÜTDBNavigator³¡¥ó¤¤¦U«ö¶sªº°ÊºA´£¥Ü¸ê°T¡C¯Ê¬Ù±¡ªp¤U¸ÓÄݩʪº­È¬°False¡A·í³]©w¥¦ªº­È¬°True®É¡A·í¥Î¤á±N·Æ¹«¹C¼Ð°±¯d¦bTDBNavigator³¡¥ó¤¤¬Y¤@­Ó±±¨î«ö¶s¤W¡A¶W¹L1¬íÄÁ®É¶¡«á¡ADelphi«K·|¦Û°ÊÅã¥Ü¦³Ãö¸Ó±±¨î«ö¶sªº´£¥Ü¸ê°T¡C

HintsÄÝ©Ê¡G¦b¯Ê¬Ù±¡ªp¤U¡ATDBNavigator³¡¥ó¤¤ªº¦U±±¨î«ö¶s³£¦³¬ÛÀ³ªº°ÊºA´£¥Ü¸ê°T¡A¦pFirst¡BPrior¡BNext¡BLastµ¥¡A¥Î¤á¥i¥H®Ú¾Ú¦Û¤vªº»Ý­n¡A³q¹L³]©wHintsÄÝ©Ê¥i¥H¬°¦U±±¨î«ö¶s³]©w¨ä¥Lªº°ÊºA´£¥Ü¸ê°T¡A¥Î¤á¦Û¤v³]©wªº°ÊºA´£¥Ü¸ê°T·|Âл\­ì¨Óªº´£¥Ü¸ê°T¡C¡@

16.6 TDBMemo³¡¥ó¤Î¨äÀ³¥Î

¡@TDBMemo³¡¥ó¥D­n¥Î©óÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªº¤j¤G¶i¨î(BLOB)«¬¦¡ªºÄæ¦ì­È¡CTDBMemo³¡¥ó¯à°÷Åã¥Ü¦h¦æ¤å¥»¡A¤]¤¹³\¥Î¤á¦b¨ä¤¤¿é¤J©M­×§ï¦h¦æ¤å¥»¸ê°T¡A¥¦¬ODelphi¤¤¥Î¨ÓÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªº¤j¤G¶i¨î«¬¦¡ªº¤å¥»Äæ¦ìªº°ß¤@ªº¼Æ¾ÚÂsÄý³¡¥ó¡C

TDBMemo³¡¥óªº¥D­nÄÝ©Ê©M§@¥Î¦p¤U¡G

ReadOnlyÄÝ©Ê¡G³o¬O¥¬º¸«¬ÄÝ©Ê¡A¬°True®É¡A¥Î¤á¥u¯à¦bTDBMemo³¡¥ó¤¤Åã¥ÜBLOB«¬¤å¥»¸ê°T¡A¦pParadox©MdBASE¸ê®Æ®wªí¤¤ªº³Æµù«¬Äæ¦ì¡C·í¬°False®É¡A¥Î¤á¦bTDBMemo ³¡¥ó¤¤¤£¶È¥i¥HÅã¥ÜBLOB¤å¥»¸ê°T¦Ó¥BÁÙ¤¹³\¥Î¤á½s¿è­×§ï¨ä¤¤ªº¤å¥»¸ê°T¡C

MaxLengthÄÝ©Ê¡G¸ÓÄݩʬO¾ã¼Æ«¬ÄÝ©Ê¡A³]©w¸ÓÄݩʪº­È¥Î©ó­­¨î¥Î¤á¦VTDBMemo ³¡¥ó¤¤¿é¤J¦r¤¸ªº­Ó¼Æ¡C­Y³]©w¸Ó­È¬°0®É¡Aªí¥Ü¿é¤J¦r¤¸ªº­Ó¼Æ¨S¦³­­¨î¡C

SCrollBarÄÝ©Ê¡G±Ô­zTDBMemo³¡¥ó¬O§_Åã¥Ü¨÷¶b¡C

WordWrapÄÝ©Ê¡G±Ô­z¦bTDBMemo³¡¥ó¤¤¿é¤J¤å¥»¸ê°T®É¡A¿é¤J¨ì¥kÃä¬É®É¡A¬O§_´«¦æ¡C

AlignmentÄÝ©Ê¡G±Ô­z¤å¥»¸ê°T¦bTDBMemo³¡¥ó¤¤ªº¹ï»ô¤è¦¡¡A¦³¤TºØ¥i¿ï­È¡GtaLeftJustify¡BtaCenter©MtaRightJustify¡C¨ä§t¸q¤À§O¬O¥ª¹ï»ô¡A©~¤¤©M¥k¹ï»ô¡C

¦b°õ¦æ¹Lµ{¤¤¡A¥Î¤á¹ïTDBMemo³¡¥ó¤¤Åã¥Üªº¤å¥»¸ê°T¬O¤£¯à°÷¶i¦æ°Å¤U¨Ó¡B«þ¨©©M¶K¤W¥h¾Þ§@ªº¡A­n·Q¨ã³Æ³o¨Ç¥\¯à¡A¥Î¤á¥²¶·µ{¦¡³]­p©I¥sCutToClipboard¡BCopyToClipboard ©MPasteFromClipboard¤èªk¤À§O¨Ó¹ê²{°Å¤U¨Ó¡A«þ¨©©M¶K¤W¥h¾Þ§@¡C

AutoDisplayÄÝ©Ê¡G¦]¬°TDBMemo³¡¥ó¤¤¥]§tµÛ¤j¶qªº¤å¥»¸ê°T¡CÀ³¥Îµ{¦¡¦b°õ¦æ¹Lµ{¤¤­nÅã¥Ü¨ä¤¤ªº¸ê°T»Ý­nªá¶O«Ü¦hªº®É¶¡¡A¯S§O¬O·í¥Î¤á²¾°Ê°O¿ý«ü¼Ð®É¡A³£­n§ó·sTDBMemo³¡¥ó¤¤Åã¥Üªº¸ê°T¡A³o¼Ë·|¤j¤j´îºCµ{¦¡ªº°õ¦æ³t«×¡C¬°¦¹Delphi¬°TDBMemo³¡¥ó³]©w¤FAutoDisplayÄÝ©Ê¡A¥Î¨Ó±±¨î¬O§_¦Û°ÊÅã¥Üªí¤¤ªº³Æµù«¬Äæ¦ì¡C·íAutoDisplay³]©w¬°False®É¡A¦bTDBMemo³¡¥ó¤¤¥uÅã¥Ü¨ä¹ïÀ³ªí¤¤ªºÄæ¦ì¦W¦Ó¤£Åã¥ÜÄæ¦ì¤¤ªº¤å¥»¸ê°T¡A¥Î¤á¦pªG·QÂsÄýÄæ¦ì¤¤ªº¤å¥»¸ê°T¡A¥Î·Æ¹«¥ªÁä³sÄò«ö¨â¤UTDBMemo³¡¥óªº¤º³¡§Y¥i¡F·í³]©wAutoDisplayÄݩʬ°True®É¡A¦bTDBMemo³¡¥ó¤¤·|¦Û°Ê¦aÅã¥Ü¨ä¹ïÀ³¸ê®Æ®wªí¤¤ªºÄæ¦ì­È¡C

³oùØ­nª`·Nªº¬O¡ATDBMemo³¡¥ó¤¤Åã¥Ü©M½s¿è¤å¥»¸ê°Tªº³Ì¤j¦ì¤¸¸s²Õ¼Æ¬°32K¡A¦b¨Ï¥Î¹Lµ{¤¤¤£­n¶W¹L³o¤@­­¨î¡C

¹Ï16.8¬OTDBMemoÅã¥Ü¸ê®Æ®wªí¤¤³Æµù«¬Äæ¦ìªº±¡§Î¡C¸Ó¨Ò¤l¦bC:\Delphi\DEMOS\DA¤l¥Ø¿ý¤¤¡A¶µ¥Ø¼Ðñ¬°FashFact.dpr¡C¡@

¥ÎTDBMemo³¡¥óÅã¥Ü³Æµù«¬Äæ¦ì¡@

16.7 TDBImage³¡¥ó¤Î¨äÀ³¥Î

¡@TDBImage³¡¥ó»PTDBMemo³¡¥ó¨ã¦³«Ü¦h¬Û¦üªºÄÝ©Ê¡A¥¦¬O¥Î¨ÓÅã¥Ü©M½s¿è¸ê®Æ®wªí¤¤ªºBLOB«¬¦¡ªºÂI°}¹Ï¹Ï¹³Äæ¦ìªº¡C

¹Ï16.8¤¤¦P®É¤]¨Ï¥Î¤F¤@­ÓTDBImage³¡¥ó¨ÓÅã¥Ü¸ê®Æ®wªí¤¤ªºÂI°}¹Ï¹Ï¹³¡C

¯Ê¬Ù±¡ªp¤U¡A¦bTDBImage³¡¥ó¤¤¬O¤¹³\¥Î¤á¹ïÂI°}¹Ï¹Ï¹³¶i¦æ½s¿èªº¡A¦p±N¹Ï¹³°Å¤U¨Ó©Î«þ¨©¨ì°Å©«ªO¤W©Î±q°Å©«ªO¤WÖß©«¨ìTDBImage³¡¥ó¤¤µ¥¾Þ§@¡A¦P®É¤]¥i¥H¦bµ{¦¡¤¤©I¥sCutToClipboard¡BCopyToClipboard©MPasteFromClipboard¤èªk¨Ó¹ê²{°Å¤U¨Ó¡B«þ¨©¡BÖß©«¾Þ§@¡A·íµM­n¶i¦æ¤W­z¾Þ§@¥²¶·½T«OTDBImageªºReadOnlyÄݩʭȬ°False¡C

TDBImage³¡¥ó¤]¨ã¦³¤@­ÓAutoDisplayÄÝ©Ê¡A¸ÓÄݩʪº±±¨î©M§@¥Î»PTDBMemo ³¡¥óªºAutoDisplayÄݩʬO¤@¼Ëªº¡C¡@

16.8 ¼Æ¾ÚÂsÄý³¡¥ó¤¤ªº¦C¥Ü¤è¶ô©M¸s¸s²Õ¦X®Ø¡@

¦b¼Æ¾ÚÂsÄý³¡¥ó¤¤¦³¥|­Ó³¡¥óÃþ¦ü©ó¼Ð·Ç³¡¥ó¤¤ªº¦C¥Ü¤è¶ô©M¸s¸s²Õ¦X®Ø¡A³o¨Ç¦C¥Ü¤è¶ô©M¸s¸s²Õ¦X®Ø¥D­n¬O¦b¸ê®Æ®wÀ³¥Îµ{¦¡¤¤¬°¥Î¤á´£¨Ñ¤@¨t¦Cªº¥i¿ï¾ÜªºÄæ¦ì­È¡Cª`·N³o¨Ç³¡¥ó¥u¯à»PTTable³¡¥ó°t¦X¨Ï¥Î¡A¦Ó¤£¯à»PTQuery³¡¥ó°t¦X¨Ï¥Î¡C¡@

ªí16.9 ¼Æ¾ÚÂsÄý³¡¥ó¤¤ªº¦C¥Ü¤è¶ô©M¸s¸s²Õ¦X®Ø

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w

³¡ ¥ó ¦W ¥Î ³~

¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X¡X

TDBlistBox ¦b¥Î¤á­×§ï¥Ø«e°O¿ý¤¤«ü©wªºÄæ¦ì­È®É¡A¥i¥Î¸Ó³¡¥óÅã¥Ü

¤@­ÓÄæ¦ì­È²M³æ¨Ñ¥Î¤á¿ï¾Ü

TDBComboBox §â¤@­ÓTDBEdit³¡¥ó»P¤@­Ó¥i¿ïªºÄæ¦ì­È²M³æµ²¦X¦b¤@°_¡A

·í¥Î¤á­×§ï¥Ø«e°O¿ý¤¤ªºÄæ¦ì®É¡A¥i¥Hª½±µ±q³¡¥ó¤¤¿é¤J

·sªºÄæ¦ì¡A¤]¥i¥H¥´¶}¤U©Ô¦¡¦C¥Ü¤è¶ô¿ï¾Ü¨ä¤¤ªº¤@­Ó¥i¿ï¶µ¡C

TDBLookapList ·í¥Î¤á­n½s¿è­×§ï¸ê®Æ®wªí¥Ø«e°O¿ýªº«ü©wÄæ¦ì®É¡A¨Ï¥Î

¸Ó³¡¥ó´£¨Ñ¦h­Ó¥i¿ï¶µ¡A³o¦h­Ó¥i¿ï¶µ¬O±q¬ÛÃöªº¨ä¥¦¼Æ

¾Ú®wªí¤¤Åª¨úªº¡A¥B¥H¦C¥Ü¤è¶ôªº§Î¦¡´£¨Ñµ¹¥Î¤á

TDBLookupCombo ¸Ó³¡¥óµ²¦X¤FTDBEdit³¡¥ó©MTDBComboBOx³¡¥óªº¥\¯à¡A¥Î

¤á¥i¥Hª½±µ¦V¸Ó³¡¥ó¤¤¿é¤JÄæ¦ì­È¡A¤]¥i¥H±q¤U©Ô¦¡²M³æ

®Ø¤¤¿ï¾Ü¤@­Ó¥i¿ï¶µ¡A¥u¬O¤U©Ô¦¡¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ¬O±q

¬ÛÃöªº¨ä¥L¸ê®Æ®wªí¤¤Åª¨ú¨Óªº¡C

¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¡@

16.9 TDBComboBox³¡¥ó

TDBComboBox³¡¥ó¤¤¥]§t¤FTDBEdit³¡¥óªº¥þ³¡¥\¯à¡A¥¦­Ì¨ã¦³¬Û¦ü©Ê¡A¤£¦Pªº¬O¦b°õ¦æ¹Lµ{¤¤TDBComboBox³¡¥ó¦P®É¦³¤@­Ó¤U©Ô¦¡¦C¥Ü¤è¶ô¡A¦b¤U©Ô¦¡¦C¥Ü¤è¶ô¤¤¦³¤@¸s¸s²Õ¥i¨Ñ¿ï¾Üªº¶µ¨Ñ¥Î¤á¿ï¾Ü¡A³o¨Ç¥i¿ï¶µ¬O¦b³]­p¶¥¬q¥Ñµ{¦¡³]­p¤H­û´£¨Ñµ¹TDBComboBox³¡¥óªºItemsÄݩʪº¡C¹Ï16.9¬OTDBComboBox³¡¥óªº¤U©Ô¦¡¦C¥Ü¤è¶ô¤¤ªº¤º®e¡Aª`·NTDBComboBox³¡¥ó¤@©w­n¹ïÀ³¸ê®Æ®wªí¤¤ªº¤@­ÓÄæ¦ì¡C¡@

¹Ï16.9 TDBComboBox³¡¥ó¦b°õ¦æ¹Lµ{¤¤¡@

TDBComboBox³¡¥óªº¤@­Ó­«­nªºÄݩʬOItemsÄÝ©Ê¡A¸ÓÄݩʤ¤¥]§tµÛTDBComboBox³¡¥ó¦b°õ¦æ¹Lµ{¤¤¤U©Ô¦¡¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ¡AItems¤¤ªº¤º®e¥i¥H¦b³]­p¶¥¬q«ü©w¡C

¦pªG¤@­ÓTDBComboBox³¡¥ó¹ïÀ³µÛ¸ê®Æ®wªí¤¤¤@­ÓÄæ¦ì¡A¨º»ò·í¥Î¤á­n½s¿è­×§ï¸ÓÄæ¦ì¤¤ªº­È®É¡A¥i¥H¥´¶}¤U©Ô¦¡¦C¥Ü¤è¶ô¡A±q¤¤¿ï¾Ü¤@­Ó¥i¿ï¶µ§@¬°Äæ¦ì­È¡A¤]¥i¥H¦Û¤v¦bTDBComboBox³¡¥ó¤¤¿é¤J¤@­Ó¨ä¥LªºÄæ¦ì­È¡C

TDBComboBox³¡¥óÁÙ¦³¤U¦C¤@¨Ç­«­nªºÄÝ©Ê¡A¥D­n¥Î¨Ó±±¨îTDBComboBox³¡¥óªºÅã¥Ü¼Ò¦¡©M­·®æªº¡C

StyleÄÝ©Ê¡G±±¨îTDBComboBox³¡¥ó¦C¥Ü¤è¶ôªºÅã¥Ü®æ¦¡ªº¡A·í¥¦ªº¨ú­È¬°¡G

¡´ CSDropDown

¯Ê¬Ù±¡ªp¤U¬°¦¹­È¡AÅã¥Ü¤@­Ó¤U©Ô¦¡¦C¥Ü¤è¶ô©M¤@­Ó½s¿è®Ø¡A¤U©Ô¦¡¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ³£¬O¦r¤¸¦ê¥B¦U¿ï¾Ü¶µ¦û©~ªº°ª«×¤@¼Ë¡C

¡´ CsSimple

¥uÅã¥Ü¤@­Ó¦C¥Ü¤è¶ô¡A¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ³£¬O¦r¤¸¦ê¡A¥B¦U¿ï¶µ¦û©~¤@¼Ëªº°ª«×¡C

¡´ CSDropDownList

Åã¥Ü¤@­Ó¤U©Ô¦¡¦C¥Ü¤è¶ô©M¤@­Ó½s¿è®Ø¡A¦ý¥Î¤á¤£¯à¦V½s¿è®Ø¤¤¿é¤J¤@­Ó¦b¦C¥Ü¤è¶ô¤¤ ¨S¦³ªº­È¡C

¡´ CSOwnerDrawFixed©MCSOWnerDrawVariable

¦b¦C¥Ü¤è¶ô¤¤¤£¶È¦³¦r¤¸¦ê¿ï¶µ¦Ó¥BÁÙ¤¹³\¦³¨ä¥L«¬¦¡ªº¿ï¶µ¡A¦pÂI°}¹Ï¹Ï¹³µ¥¡A³o¤è ­±ªº¸Ô²Ó¸ê°T½Ð°Ñ¬Ý³s½u»²§U±Ô­z¡C¡@

DropDownCountÄÝ©Ê¡G¤¹³\¦C¥Ü¤è¶ô¤¤Åã¥Ü¥i¿ï¶µªº³Ì¤j¼Æ¥Ø¡A·í¥i¿ï¶µ¼Æ¥Ø¤j©ó¸ÓÄݩʭȮɡA¥Î¤á¥i¥H¥Î¨÷¶b¹î¬Ý¥þ³¡ªº¥i¿ï¶µ¡A·í¥i¿ï¶µ¼Æ¤p©ó¸ÓÄݩʭȮɡA¦C¥Ü¤è¶ô·|¦Û°Ê½Õ¾ã¨ä¤j¤p¥H¨¬°÷Åã¥Ü¥þ³¡¥i¿ï¶µ¡C

ItemHeightÄÝ©Ê¡G·íTDBComboBox³¡¥óªºStyleÄݩʳQ³]©w¬°CSOwnerDrawFixed®É¡A¥Î¦¹Äݩʨӳ]©w¦C¥Ü¤è¶ô¤¤¨C­Ó¥i¿ï¶µ¦û©~ªº°ª«×¡C

SortedÄÝ©Ê¡G¥¬º¸«¬ÄÝ©Ê¡A¥¦¨M©w¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ¬O§_«ö¦r¥Àªº±Æ¦C¶¶§Ç±Æ§Ç¡C¡@

16.10 TDBListBox³¡¥ó¡@

TDBListBox³¡¥óªº°ò¥»¥\¯à»PTDBComboBox³¡¥ó°ò¥»¤W¬O¤@¼Ëªº¡A¥¦­Ìªº¤£¦P¤§³B¦b©óTDBListBox³¡¥ó¨S¦³¤U©Ô¦¡¦C¥Ü¤è¶ô¦Ó¬O¤@­Ó¦C¥Ü¤è¶ô¡A¦b¦C¥Ü¤è¶ô¤¤Åã¥Ü¤@¸s¸s²Õ¨Ñ¥Î¤á¿ï¾Üªº¥i¿ï¶µ¡A¦b°õ¦æ¹Lµ{¤¤¡A¥Î¤á«ö¤@¤U¨ä¤¤ªº¥i¿ï¶µ¥i¥H¬°TDBListBox ³¡¥ó¹ïÀ³ªºÄæ¦ì½á¤@­ÓÄæ¦ì­È¡A¦ý¥Î¤á¤£¯à¦Û¤v±qÁä½L¤W¿é¤J¤@­Ó¦C¥Ü¤è¶ô¤¤¤£¦s¦bªºÄæ¦ì­È¡C

¦pªG¦bÀ³¥Îµ{¦¡¤¤¡ATDBListBox¹ïÀ³¸ê®Æ®wªí¤¤¤@­Ó¨ãÅ骺Äæ¦ì¡A¨º»ò·í¦b¼Æ¾Ú¶°¤¤²¾°Ê°O¿ý«ü¼Ð®É¡A¥Ø«e°O¿ý¤¤¹ïÀ³TDBListBox³¡¥óªºÄæ¦ìªº­È¦bTDBListBox³¡¥óªº¦C¥Ü¤è¶ô¤¤±N¥H°ª¥ú«×Åã¥Ü¡A¦pªG¥Ø«e°O¿ýªº¸ÓÄæ¦ì­È¤£¦b¦C¥Ü¤è¶ô¤¤¡A¨º»ò¦C¥Ü¤è¶ô¤¤ªº¥i¿ï¶µ¨S¦³¤@¶µ¬O°ª¥ú«×¦aÅã¥Üªº¡C

TDBListBoxªº´X­ÓÄÝ©Ê¡G

IntegralHeightÄÝ©Ê¡G¸ÓÄݩʬO¥Î¨Ó±±¨îTDBListBox³¡¥ó¤¤ªº¦C¥Ü¤è¶ôªºÅã¥Ü®æ¦¡ªº¡C·í¸ÓÄݩʭȬ°True(¯Ê¬Ù±¡ªp¤U¬°¦¹­È)®É¡A¦C¥Ü¤è¶ô©³³¡ªº¥i¿ï¶µ¦Û°Ê¦a²¾¨ì¤W¤@¦¸³Q¿ï¥Î¹Lªº¥i¿ï¶µªº¤W­±¡C·í¸ÓÄݩʪº­È¬°False®É¡A¦C¥Ü¤è¶ô©³³¡ªº¥i¿ï¶µªºÅã¥Ü¤è¦¡¨ú¨M©óTDBListBox³¡¥óªºItemHeightÄÝ©Ê¡A¨Ã¥B¦C¥Ü¤è¶ô©³³¡¥i¿ï¶µ¥i¯à¤£¯à³Q¥þ³¡¦aÅã¥Ü¥X¨Ó¡C

¡@


«á¤@­¶
«e¤@­¶
¦^¥Ø¿ý
¦^­º­¶