zoukankan      html  css  js  c++  java
  • 实现RadioButton自动换行

      

      '如果一行显示不完,则多行显示
        Private Sub rbKey0TextReload(ByVal rbKey0 As RadioButton)
            Dim textSize As Size = TextRenderer.MeasureText(rbKey0.Text, rbKeyA.Font) '文字的大小
            Dim radiobuttonSize As Size = rbKey0.Size '选框的大小
            Dim hang As Integer = 0 '要显示几行
            hang = textSize.Width \ radiobuttonSize.Width
            If textSize.Width Mod radiobuttonSize.Width > 0 Then
                hang = hang + 1
            End If
            rbKey0.Size = New Size(radiobuttonSize.Width, hang * 21)
        End Sub

  • 相关阅读:
    模块的搜索路径
    循环导入问题
    模块的四种形式
    匿名函数
    面向过程编程
    内置函数
    名称空间和作用域
    函数嵌套
    函数对象
    可变长参数
  • 原文地址:https://www.cnblogs.com/yzy666/p/1752215.html
Copyright © 2011-2022 走看看