Caption Font

6 posts, 0 answers
  1. DP
    DP avatar
    14 posts
    Member since:
    Jul 2008

    Posted 04 Aug 2008 Link to this post

    In ExplorerBarStyle RadPanelBar I am trying to set the font of RadPanelBarGroupElement(s) caption to Bold and underlined. I can't find where to set this at design time. So I am doing it at run time as follows:

    RadPanelBarGroupElement1.GetCaptionElement().Font =

    New Font(RadPanelBarGroupElement1.GetCaptionElement().Font.FontFamily, 14, FontStyle.Bold)

    However, I can set the font style to either Bold or Underline but not both.

    What is the best way to set the font?

    Thanks ... DP
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 04 Aug 2008 Link to this post

    Hello DP,

    Thank you for writing me.

    The way you currently set the font works fine and that's the way you should use.

    If you have any other questions please write me back.

    All the best,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. DP
    DP avatar
    14 posts
    Member since:
    Jul 2008

    Posted 04 Aug 2008 Link to this post

    Dear Boyko,

    Thankyou for you your quick response.

    My question was - how do I set the font bold as well as underlined.

    I am able to do either bold or under lined.

    Thanks ... DP
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 06 Aug 2008 Link to this post

    Hello DP,

    Here is a sample code to achieve your goal:

    radPanelBarGroupElement1.GetCaptionElement().Font =
    new Font(radPanelBarGroupElement1.GetCaptionElement().Font.FontFamily, 14, FontStyle.Bold | FontStyle.Underline);


    I hope this helps.

    All the best,
    Boyko Markov
    the Telerik team

    P.S. We are starting work on a major upgrade of the Visual Style Builder application for the WinForms Controls and we need your help! Please, take a moment to take the survey - we won’t forget your points. You can read more on the initiative here.


    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. DP
    DP avatar
    14 posts
    Member since:
    Jul 2008

    Posted 06 Aug 2008 Link to this post

    Thanks again Boyko.

    VB.net does not like "|" says invalid character ( it may be right for C#)..

    What is the separator for VB?

    Regards ... DP
  7. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 08 Aug 2008 Link to this post

    Hi DP,

    The code in VB should look like the one below:

    radPanelBarGroupElement1.GetCaptionElement().Font = New Font(radPanelBarGroupElement1.GetCaptionElement().Font.FontFamily, 14, FontStyle.Bold Or FontStyle.Underline)

    To convert code from C# to VB you can use  the following converter:

    http://converter.telerik.com/batch.aspx

    Sincerely yours,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready