in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Changing the scale font settings at runtime

Last post 10/30/2008 10:37 AM by Dmitry G (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 10/30/2008 6:03 AM

    Changing the scale font settings at runtime

    Hi there,

    I was wondering if there was a way to change the font-size and family of a ArcScaleComponent?

    I tried to do it like this:

    --------------

    circularGauge.AddScale();

     

     

    ArcScaleComponent scale1 = circularGauge.Scales[0];

    scale1.AppearanceTickmarkText.Font.Size = 5;

    -----------------

    But this appears to be a read-only property.

  • 10/30/2008 10:37 AM In reply to

    Re: Changing the scale font settings at runtime

    Hello Peter!
    I'm afraid you can't change the Size property of a Font object directly because  Font object is immutable (GDI+ feature).
    You must change the whole font:
    //..
      scale1.AppearanceTickmarkText.Font = new Font(scale1.AppearanceTickmarkText.Font.FontFamily, 5f);
    //..

    Thanks, Dmitry

    R&D, .NET Team
    Developer Express Inc.
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED