Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserControl Properties! Pls Help 1

Status
Not open for further replies.

Fori

Programmer
Jun 18, 2003
84
MT
Hi All

I have a usercontrol and i would like to see all the control properties on the vb property box !! How can i do it!

Thanks
Nick
 
Public properties ?
Property pages ?

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Sellect the control on your form with the mouse then on the vb menu select view / properties window, or just type the F4 key.
 
Sorry maybe i didn't make my self clear! i have created properties for the user control and i would like them to be seen on the property box when i'm using the control!
Thanks
Nick
 
Are the properties PUBLIC?



I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
So you have something like this . . .

Public Property Get Caption() As String
Caption = lblLabel.Caption
End Property

Public Property Let Caption(ByVal New_Caption As String)
lblLabel.Caption() = New_Caption
PropertyChanged "Caption"
End Property

and when you have the control on the form you can't see the Caption property ?

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Yeah...oops! I forgot i have to have both the Let and the GET properties!

Thanks
Nick
 
;-)

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
hello!
i had problem with Font property! i use:
Public Property Get Font() As StdFont
Set Font = mTEXTBOX.Font
End Property

Public Property Set Font(mnewFont As StdFont)
Set mTEXTBOX.Font = mnewFont
PropertyChanged "Font"
End Property

now, in project windows it works, i mean it change the font, when i lunch the project it comes back to original font!
any suggestion why it happens?
 
Hi Aldair

i would suggest you open another thread for this!
 
You need to write and read from the property bag, look in help for: UserControl object, exposing properties and methods
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top