Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
CSS
Hi, I have two questions:
1. How can I have A Text Property Like TextBox ...
2. How can I Make Browse For File or Directory Property ...


<img src="http://city-upload.com/i/00001/5kvttzo3z24p_t.jpg" border=0>"
Posted
Updated 1-Oct-13 20:08pm
v4

I Find it:


[VB]
Private TargetValue As String
<Editor(GetType(System.Windows.Forms.Design.FolderNameEditor), GetType(System.Drawing.Design.UITypeEditor))> _
    Public Property Target() As String
    Get
        Return TargetValue
    End Get
    Set(ByVal value As String)

        TargetValue = value
    End Set
End Property

Private TagValue As String
<Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(System.Drawing.Design.UITypeEditor))> _
Public Property Tag() As String
    Get
        Return TagValue
    End Get
    Set(ByVal value As String)
        TagValue = value
    End Set
End Property

[/VB]
 
Share this answer
 
v5
  1. What do you mean "like"? TextBox or not? Anyway, just a few examples:
    C#
    class MyType {
        internal TextBox FirstTextBox { get; set; }
        public TextBox SecondTextBox { get; private set; }
        public TextBox ThirdTextBox {
           get { return thirdTextBox; }
        }
        // and so on...
        TextBox thirdTextBox = new TextBox();
        // ...
    }
  2. You need to look any many pretty similar methods. Please see:
    http://msdn.microsoft.com/en-us/library/system.io.directory.getdirectories.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directory.getfiles.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.getdirectories.aspx[^],
    http://msdn.microsoft.com/en-us/library/system.io.directoryinfo.getfiles.aspx[^].


Good luck,
—SA
 
Share this answer
 
I mean: I want to make Property Like Text Property of TextBox or Label Control for usercontrol to use in design mode

thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900