-
i have created an extended user control based on TextBox control, which inherits most of the control's properties, like font, for/back colors etc.
When I put the user control on my form, and when I click on the font property, it always pops up the fonts property page instead of the normal fonts popup window. I've set the PropertyPage property of the user control to 'None'. The same applies to the colors-related properties.
Are there any other settings I need to do to get rid of the property page?
-
Very roughly ...
Code:
Option Explicit
Private MyFont As font
Public Property Get font() As font
Set font = MyFont
End Property
Public Property Set font(ByVal NewFont As font)
Set MyFont = NewFont
End Property
-
Thank you for your reply, but this is not what i'm looking for. I have the similar code for setting and getting the font property.
With most standard controls, when you click on the Font property (if there's one for that control), a standard popup fonts window is displayed. Instead of displaying this standard window, a property page is displayed when I clicked on the Font property of my control. I don't like using this property page.
Any ideas?
-
If you want to get rid of your property page (the one you designed, delete it completely by finding the file for it, i guess you saved it in the sae folder as the rest of the source (thats where most peeps put it) and the file extension shoulf be .pag
DocZaf
{;->
off course you may have to chack the .vbp file for any references to the property page and remove them in oreder to not recieve erros during loading.
And finally it goes without saying, if its important, back it up first!
DocZaf
{;->
-
How about emailing me the code carolyn?
-
The code:
Code:
Public Property Get Font() As Font
Set Font = txtInput.Font
End Property
Public Property Set Font(ByVal NewValue As Font)
Set txtInput.Font = NewValue
PropertyChanged "Font"
End Property
txtInput is VB's standard TextBox control.
I also have problem with color-related properties, that the color property page is displayed of the pull down list from the property list window.
My code for the color related properties
Code:
Public Property Get BackColor() As OLE_COLOR
BackColor = mBackColor
End Property
Public Property Let BackColor(ByVal NewValue As OLE_COLOR)
txtInput.BackColor = NewValue
mBackColor = NewValue
PropertyChanged "BackColor"
End Property
Public Property Get FocusBackColor() As OLE_COLOR
FocusBackColor = mFocusBackColor
End Property
Public Property Let FocusBackColor(ByVal NewValue As OLE_COLOR)
mFocusBackColor = NewValue
PropertyChanged "FocusBackColor"
End Property
[Edited by carolyn on 04-11-2000 at 08:46 PM]
-
I was more intersted in the bits that are not visible in the vb editor, the bits in the project file and the other bits in the control file
to see if there is/was anything astray in there
DocZaf
{;->
-
Hi Caroline,
Thanks for the e
I have found the errors and corrected them, check your email in about 10 mins, i'm just commenting the changes.
I did notice something strange though,
When i clicked on the control to select it and thenpressed the delete key it refused to be deleted, but when i right clicked on it and selected delete from the popup menu it went soon enough.
Anyway i thought i'd mention that.
DoZaf
{;->