OWL NExt - Knowledge Base

[ Home | Contents | Search | Next | Previous | Up ]

Changing status bar font.

Date: 11/30/99
Time: 12:51:25 AM

Status bar doesn't have function SetFont, so you need to create derived class from TStatusBar and add function SetFont():

void TStatusBarEx::SetFont(TFont* font)
{
  delete Font;
  Font = font ? font : new TGadgetWindowFont(6);

  TEXTMETRIC metrics;
  Font->GetTextMetrics(metrics);
  FontHeight = metrics.tmHeight + metrics.tmExternalLeading;

  Attr.H = FontHeight;

  if(Attr.Style & WS_BORDER)
    Attr.H += 2 * TUIMetric::CyBorder;

  LayoutSession();
}

Yura, Gianni

Last changed: July 14, 2001