c#窗体StatusBar状态栏控件 梦里梦外; 2023-06-27 15:59 4阅读 0赞 1、首先将控件导入工具包 在工具箱中右击任意控件》选择项》找到StatusBar确定导入 2、可以在属性中找到Panels属性进行分栏,将ShowPanels改为true才会显示出分好的栏目,栏目总宽度如果大于状态栏宽度有的会显示不出来,如果想用自己定义的样式则炫需要将style改为OwnerDraw ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0_size_16_color_FFFFFF_t_70][] ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0_size_16_color_FFFFFF_t_70 1][] 3、可以通过statusBar1.Panels\[0\].Text来为栏目显示文本,想用自己定义的样式可以在DrawItem事件中定义,一定要将style改为OwnerDraw否则这事件进不来 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0_size_16_color_FFFFFF_t_70]: https://img-blog.csdnimg.cn/20200107132804585.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0,size_16,color_FFFFFF,t_70 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0_size_16_color_FFFFFF_t_70 1]: https://img-blog.csdnimg.cn/20200107133026475.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1kxMTcyMjE1Nzg0,size_16,color_FFFFFF,t_70
还没有评论,来说两句吧...