dcsimg
Results 1 to 5 of 5

Thread: Descriptions of nested properties in the property grid,

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2016
    Location
    UK
    Posts
    42

    Descriptions of nested properties in the property grid,

    I've been making some controls that use nested properties, I was wondering if there was any way to cut down the size of the descriptions a bit in the property grid? Name:  example.jpg
Views: 173
Size:  50.0 KB

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    22,462

    Re: Descriptions of nested properties in the property grid,

    You'll need to show us your code...

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2016
    Location
    UK
    Posts
    42

    Re: Descriptions of nested properties in the property grid,

    Hi Paul

    Code:
    Imports System.ComponentModel
    
    Public Class SkinnedPanelReactive
    
        Inherits Panel
    
        Public Enum Control_State
            StateNull
            StateNormal
            StateOver
            StateDown
            StateClicked
            StateDisabled
        End Enum
    
        Private _StatusSkins As SkinSetStatus
        Private _CurState As Control_State
        Private _NewState As Control_State
        Private _BooleanButton As Boolean
        Private _Clicked As Boolean
    
        Private _ImgFilter As ImageFilter
    
    
        <DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
        Public ReadOnly Property StatusSkins() As SkinSetStatus
            Get
                Return _StatusSkins
            End Get
        End Property
    Code:
    Imports System.ComponentModel
    Imports System.Drawing
    Imports System.Windows.Forms
    
    <ToolboxItem(False)> <DisplayName("SkinSet Status")>
    Public Class SkinSetStatus
    
        Inherits Component
    
        Private _SkNormal As SkinItem
        Private _SkOver As SkinItem
        Private _SkDown As SkinItem
        Private _SkClicked As SkinItem
        Private _SkDisabled As SkinItem
        Private _SkinnedCntrl As Control
    
        Friend ReadOnly Property SkinnedControl() As Control
            Get
                Return Me._SkinnedCntrl
            End Get
        End Property
    
        <DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
        Public ReadOnly Property SkinNormal() As SkinItem
            Get
                Return Me._SkNormal
            End Get
        End Property
    Code:
    Imports System.ComponentModel
    Imports System.Drawing
    Imports System.Windows.Forms
    
    <ToolboxItem(False)>
    Public Class SkinItem
    
        Inherits Component
    
        Public Enum BackColor_SampleLocation
            TopLeft
            TopRight
            Center
            BottomLeft
            BottomRight
        End Enum
    
        Private _Skin As Bitmap
        Private _Background As Bitmap
        Private _CornerSizeValue As Integer
        Private _BkClrSampleLoc As BackColor_SampleLocation
        Private _SugBkCol As Color
    
        Private _SkSetStatus As SkinSetStatus
    
        <DisplayName("Skin Sample")> <Category("Skin data record")>
        Public Property Skin() As Bitmap
            Get
                Return _Skin
            End Get
            Set(ByVal value As Bitmap)
                _Skin = value
                If _Skin IsNot Nothing Then
                    SetSuggestedBackColor()
                End If
            End Set
        End Property

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,961

    Re: Descriptions of nested properties in the property grid,

    What you're seeing is the result of calling ToString on objects of the types of the properties. The default implementation of that method, inherited from the Object class, simply returns the fully qualified name of the type. If you want to see something different then you'll need to override the ToString methods of those types and return the results you want to see.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2016
    Location
    UK
    Posts
    42

    Re: Descriptions of nested properties in the property grid,

    Thanks jmcilhinney

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width