[dba-VB] Set value of BrowsableAttribute at runtime

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Thu Sep 17 12:48:35 CDT 2009


Hi Charlotte and all,

I have got the answer from other source that the value of BrowsableAttribute
as well as of other attributes can't be set at runtime. Sorry, that was a
wrong request of mine.

Thank you.

--Shamil

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Thursday, September 17, 2009 9:11 PM
To: 'Discussion concerning Visual Basic and related programming issues.'
Subject: Re: [dba-VB] Set value of BrowsableAttribute at runtime

Hi Charlotte,

Thank you for your response.

But I have to set BrowsableAttribute value at runtime using .NET Reflection
I guess. Do you or somebody in your .NET developers shop know how to do
that?

Yes, I can translate to C# :)

Thank you.

--Shamil

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Thursday, September 17, 2009 9:02 PM
To: Discussion concerning Visual Basic and related programming issues.
Subject: Re: [dba-VB] Set value of BrowsableAttribute at runtime

Import the System.ComponentModel, then you can apply the
browsableattribute

    <Browsable(False), Bindable(True)> _
    Public Property Value() As Object
        Get
            Return _value
        End Get
        Set(ByVal Value As Object)
            _value = Value
            Call RenderValue()
            RaiseEvent ValueChanged(Me, EventArgs.Empty)
        End Set
    End Property


You'll have to translate into C# yourself!  LOL

Charlotte 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Thursday, September 17, 2009 9:42 AM
To: 'Discussion concerning Visual Basic and related programming issues.'
Subject: [dba-VB] Set value of BrowsableAttribute at runtime

Hi All,

 

I wanted to set a value of BrowsableAttribute at runtime:

 

public class MyClass

{

     [Browsable(true)]

     public int P1 { get; set }            

     ...

}

 

I can't find a way how to do that.

 

Any hints, tips and tricks would be greatly appreciated here.

 

Thank you.

 

--Shamil

 

 

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com


_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4434 (20090917) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru


 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4434 (20090917) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru
 

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4434 (20090917) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru


 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4434 (20090917) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru
 




More information about the dba-VB mailing list