| IGLib 1.7.2 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events | Private Member Functions | Private Attributes | List of all members
IG.Forms.FontSelectorSimple Class Reference

Simple control that allows font selection. More...

Inheritance diagram for IG.Forms.FontSelectorSimple:
[legend]
Collaboration diagram for IG.Forms.FontSelectorSimple:
[legend]

## Public Member Functions
| FontSelectorSimple ()
| FontSelectorSimple (Font initialFont)
string | FontDescriptionShort ()
| Returns short textual description of the selected forn. More...
void | UpdateAppearance ()
| Updates appearance of the control, according to the state of font selection and the actual font. More...

## Static Public Member Functions
static string | FontDesctiptionShort (Font font)
| Returns a short desription of the specified font. More...

## Public Attributes
string | _initialFontLabelText = "< Click to select font! >"

## Protected Member Functions
void | OpenFontDialog ()
void | OnFontSelected (object sender, FontEventArgs eventArgs)
| Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time. More...
void | OnFontSelectedFirstTime (object sender, FontEventArgs eventArgs)
| Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time. More...

## Properties
bool | IsFontSelected`[get, set]`
Font | SelectedFont`[get, set]`
string | InitialFontLabelText`[get, set]`
Color | InitialFontLabelForeColor`[get]`
Color | NormalFontLabelForeColor`[get]`

## Events
FontEventHandler | FontSelected
| Event that is fired when the selected font changes. More...
FontEventHandler | FontSelectedFirstTime
| Event that occurs when the selected font gets defined (i.e., when it is set for the first time). More...

## Private Member Functions
void | btnOpenDialog_Click (object sender, EventArgs e)
void | lblFontDescription_Click (object sender, EventArgs e)
void | InitializeComponent ()
| Required designer variable. More...

## Private Attributes
bool | _isFontSelected = false
Font | _selectedFont = new Font("Times New Roman", 10)
System.Windows.Forms.Button | btnOpenDialog
System.Windows.Forms.FontDialog | fontDialog1
System.Windows.Forms.Label | lblFontDescription

## Detailed Description

Simple control that allows font selection.

Contains a button for font selection and a label with short description of the current font.

The font is initially unspecified when control if control is created with default constructor.

Font can be queeried, and change of font fires an event.

## Constructor & Destructor Documentation

IG.Forms.FontSelectorSimple.FontSelectorSimple | ( |  | ) |
| inline

IG.Forms.FontSelectorSimple.FontSelectorSimple | ( | Font | initialFont | ) |
| inline

## Member Function Documentation

string IG.Forms.FontSelectorSimple.FontDescriptionShort | ( |  | ) |
| inline

Returns short textual description of the selected forn.

static string IG.Forms.FontSelectorSimple.FontDesctiptionShort | ( | Font | font | ) |
| inline static

Returns a short desription of the specified font.

Description contains font size, family name, and descriptors indicating whether it is bold, italic, underlined, or strikedout, separated by commas. If font has no modifier properties like bold then hte corresponding discriptor is just empty. Descriptors are like "bold", "italic", "underlined", etc.

Parameters

  font | Font whose description is returned.

Returns

void IG.Forms.FontSelectorSimple.UpdateAppearance | ( |  | ) |
| inline

Updates appearance of the control, according to the state of font selection and the actual font.

void IG.Forms.FontSelectorSimple.OpenFontDialog | ( |  | ) |
| inline protected

void IG.Forms.FontSelectorSimple.OnFontSelected | ( | object | sender,
|  | FontEventArgs | eventArgs
| ) |  |
| inline protected

Triggers the FontSelected event. This occurs whenewer the selected font is changed, or when it is set for the first time.

void IG.Forms.FontSelectorSimple.OnFontSelectedFirstTime | ( | object | sender,
|  | FontEventArgs | eventArgs
| ) |  |
| inline protected

Triggers the FontSelectedFirstTime event. This occurs when font is selected for the first time.

void IG.Forms.FontSelectorSimple.btnOpenDialog_Click | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.FontSelectorSimple.lblFontDescription_Click | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

void IG.Forms.FontSelectorSimple.InitializeComponent | ( |  | ) |
| inline private

Required designer variable.

Required method for Designer support - do not modify the contents of this method with the code editor.

## Member Data Documentation

bool IG.Forms.FontSelectorSimple._isFontSelected = false
| private

Font IG.Forms.FontSelectorSimple._selectedFont = new Font("Times New Roman", 10)
| private

string IG.Forms.FontSelectorSimple._initialFontLabelText = "< Click to select font! >"

System.Windows.Forms.Button IG.Forms.FontSelectorSimple.btnOpenDialog
| private

System.Windows.Forms.FontDialog IG.Forms.FontSelectorSimple.fontDialog1
| private

System.Windows.Forms.Label IG.Forms.FontSelectorSimple.lblFontDescription
| private

## Property Documentation

bool IG.Forms.FontSelectorSimple.IsFontSelected
| get set protected

Font IG.Forms.FontSelectorSimple.SelectedFont
| get set

string IG.Forms.FontSelectorSimple.InitialFontLabelText
| get set

Color IG.Forms.FontSelectorSimple.InitialFontLabelForeColor
| get protected

Color IG.Forms.FontSelectorSimple.NormalFontLabelForeColor
| get protected

## Event Documentation

FontEventHandler IG.Forms.FontSelectorSimple.FontSelected

Event that is fired when the selected font changes.

FontEventHandler IG.Forms.FontSelectorSimple.FontSelectedFirstTime

Event that occurs when the selected font gets defined (i.e., when it is set for the first time).

The documentation for this class was generated from the following files:

- igforms/Utilities/BasicControls/FontSelectorSimple.cs
- igforms/Utilities/BasicControls/FontSelectorSimple.Designer.cs