|
-
May 20th, 2004, 01:53 AM
#1
making a label control accept focus?
It sure must be possible because LinkLabel inherits from the label control and it can accept focus. Does anyone know how to make the label control accept focus? (I'm trying to make my own control my inheriting from the label control)
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 20th, 2004, 04:48 AM
#2
PowerPoster
Hi,
Surely an inherited control can have additional properties from the base control?
If this cannot be done you have the alternative of inheriting from the LinkLabel control instead.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
May 20th, 2004, 11:41 AM
#3
eeh ok, the label control doesnt get the focus... if I can just get the onGotFocus event of label to fire somehow... There is a CanFocus property and I overrode that to always return true, still doesnt help
any ideas?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 20th, 2004, 12:09 PM
#4
Sleep mode
How about textbox and changing some background and drawing stuff to mimic a label look .
-
May 20th, 2004, 12:14 PM
#5
-
May 20th, 2004, 02:47 PM
#6
Frenzied Member
In VB6 if a label was given focus, it automatically sent the focus to the next item in the tab order. If .Net does that, you'd have to override that behavior somehow.
-
May 20th, 2004, 04:35 PM
#7
Originally posted by salvelinus
you'd have to override that behavior somehow.
that was my question actually 
I can KEEP the focus there when you call myLabel.focus()... but sitll on a form when I press the tab key it wont get the focus
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 20th, 2004, 06:31 PM
#8
Frenzied Member
I'd think that you'd have to know what code in the base label is responsible for that behavior to override it (going on old C++/Java work, haven't done it in VB). I don't know if MS exposes it, or if it's overridable. I think the label does get the focus, just doesn't keep it.
You could set some kind of flag, and when it jumps to the next taborder control, set it back one, if label.focus works like you say.
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
|