Author Topic: Selector Switch control with Muti-line Text  (Read 1153 times)

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Selector Switch control with Muti-line Text
« on: February 13, 2019, 08:01:54 PM »
In order to make text appear in 2 lines , I have to play with spaces, would it be better with multi line text? what do you think?
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Selector Switch control with Muti-line Text
« Reply #1 on: February 13, 2019, 09:11:08 PM »
That's a good idea. I just put it in and will be there in the next release.

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: Selector Switch control with Muti-line Text
« Reply #2 on: February 13, 2019, 09:14:04 PM »
Thanks, Archie


Selector SW
OFF       ON

Code: [Select]
#Region "Basic Properties"

    '******************************
    '* Property - Text
    '******************************
    Private m_Text As String
    <System.ComponentModel.Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(System.Drawing.Design.UITypeEditor))>
    Public Shadows Property Text() As String
        Get
            Return m_Text
        End Get
        Set(ByVal value As String)
            m_Text = value
            MyBase.Text = m_Text
        End Set
    End Property

#End Region
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Selector Switch control with Muti-line Text
« Reply #3 on: February 13, 2019, 09:29:48 PM »
You actually don't need to create a backing field.
Code: [Select]
    <System.ComponentModel.Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(System.Drawing.Design.UITypeEditor))>
    Public Overrides Property Text As String
        Get
            Return MyBase.Text
        End Get
        Set(value As String)
            MyBase.Text = value
        End Set
    End Property\