Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #381

Re: User Control Font Object

From Karl E. Peterson <karl@exmvps.org>
Newsgroups comp.lang.basic.visual.misc, microsoft.public.vb.general.discussion
Subject Re: User Control Font Object
Date 2011-08-17 15:00 -0700
Organization exMVPs.org
Message-ID <j2hdme$cue$1@dont-email.me> (permalink)
References <j2h6hi$smr$1@dont-email.me> <j2ha3l$kul$1@dont-email.me> <j2hc7a$3gk$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


Mike Williams presented the following explanation :
> "Karl E. Peterson" <karl@exmvps.org> wrote in message 
> news:j2ha3l$kul$1@dont-email.me...
>
>> As Nobody suggested, you need to persist the design-time choice. Something 
>> like this, maybe... [code snipped]
>
> Thanks Karl. I had actually added code to the UserControl_ReadProperties and 
> WriteProperties Subs which already contains code for other things I was 
> doing, but nothing I placed there for fonts solved the problem and so for 
> brevity I left it out of the code I posted. It was your suggestion of using 
> the the Ambient property which did the trick. I very rarely get involved with 
> UserControls and I did not know about that. I suppose I should have spent 
> more time investigating the various properties in the help files, but by the 
> time I had decided to post here I had tried all sorts of stuff for hours and 
> hours and my head was beginning to spin ;-)  Thank you, Karl. It is working 
> fine now. Thank you to Nobody as well for his solution. I'll have a look at 
> that later.

Y'know, that's one I'm not sure I've ever seen written up anywhere, 
either.  It's a great thing to know about, as your control will inherit 
the default font of the parent object.  (The docs lie, doesn't matter 
what the Container's font is.)

-- 
.NET: It's About Trust!
http://vfred.mvps.org

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Find similar


Thread

User Control Font Object "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-17 20:06 +0100
  Re: User Control Font Object "Nobody" <nobody@nobody.com> - 2011-08-17 16:37 -0400
    Re: User Control Font Object "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-18 00:22 +0100
  Re: User Control Font Object Karl E. Peterson <karl@exmvps.org> - 2011-08-17 13:59 -0700
    Re: User Control Font Object "Mike Williams" <Mike@WhiskyAndCoke.com> - 2011-08-17 22:36 +0100
      Re: User Control Font Object Karl E. Peterson <karl@exmvps.org> - 2011-08-17 15:00 -0700

csiph-web