Files
PatientMgr-CSharp/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.cs
T
2019-06-20 14:49:34 +01:00

62 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sarand.Win.Forms.Controls;
using Sarand.Win.Forms.Utils;
namespace Sarand.PatientMgr.Win.Forms.Base
{
//=======================================================================
public partial class SpmGroupBox : SacsGroupBox
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
public SpmGroupBox()
{
InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null) components.Dispose();
}
base.Dispose(disposing);
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// Initialisation.
protected override void OnCreateControl()
{
base.OnCreateControl();
if (this.IsDesignerHosted()) return;
// Assign current font to all child controls so that they don't use the new font.
Font fontControls = this.Font;
foreach (Control control in Controls)
if (control.Font == null || control.Font == fontControls) control.Font = fontControls;
// Default font settings.
Font fontGroupBox = new Font(fontControls.FontFamily, 10.0f, FontStyle.Bold);
this.Font = fontGroupBox;
Rectangle displayRectangle = DisplayRectangle;
}
//-------------------------------------------------------------------
}
//=======================================================================
}