|
-
Apr 14th, 2005, 10:19 PM
#1
GetType 2x [Resolved]
How do you set the DefaultAttribute on the Anchor property?
I want the default to be AnchorStyles to be AnchorStyles.Top Or AnchorStyles.Left but the default
attribute is not detecting the numeric equilivalent or it which is 5.
VB Code:
DefaultValue(GetType(AnchorStyles), "Top") 'But needs to include "Left" also.
'Cant do -
DefaultValue(5) ' the right click popup menu still shows the Reset menut item as enabled.
'Cant do -
DefaultValue(GetType(AnchorStyles), "Top" Or GetType(AnchorStyles), "Left") 'gives build error.
Last edited by RobDog888; Apr 14th, 2005 at 10:32 PM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 14th, 2005, 10:32 PM
#2
Re: GetType 2x
I knew it would be something simple
I had tried this already but I had a space inbetween the comma - "Top, Left". Needs to be - "Top,Left"
VB Code:
<Browsable(True), Category("Layout"), DefaultValue(GetType(AnchorStyles), "Top,Left")> _
Public Shadows ReadOnly Property Anchor() As AnchorStyles
Get
Return AnchorStyles.Top Or AnchorStyles.Left
End Get
End Property
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|