# wxRichTextStyleListCtrl Class Reference
[Rich Text]

`#include </home/work/projects/wx/2.9/wx/interface/wx/richtext/richtextstyles.h>`

Inheritance diagram for wxRichTextStyleListCtrl:
[legend]

## Detailed Description

This class incorporates a wxRichTextStyleListBox and a choice control that allows the user to select the category of style to view.

It is demonstrated in the wxRichTextCtrl sample in `samples/richtext`.

To use wxRichTextStyleListCtrl, add the control to your window hierarchy and call wxRichTextStyleListCtrl::SetStyleType with one of wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL, wxRichTextStyleListBox::wxRICHTEXT_STYLE_PARAGRAPH, wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER and wxRichTextStyleListBox::wxRICHTEXT_STYLE_LIST to set the current view.

Associate the control with a style sheet and rich text control with SetStyleSheet and SetRichTextCtrl, so that when a style is double-clicked, it is applied to the selection.

## Styles

This class supports the following styles:

- wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR:
  This style hides the category selection control.

##

Library: wxRichText
Category: Rich Text

## Public Member Functions

bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
| Creates the windows.
wxRichTextCtrl * | GetRichTextCtrl () const
| Returns the associated rich text control, if any.
wxChoice * | GetStyleChoice () const
| Returns the wxChoice control used for selecting the style category.
wxRichTextStyleListBox * | GetStyleListBox () const
| Returns the wxListBox control used to view the style list.
wxRichTextStyleSheet * | GetStyleSheet () const
| Returns the associated style sheet, if any.
wxRichTextStyleListBox::wxRichTextStyleType | GetStyleType () const
| Returns the type of style to show in the list box.
void | SetRichTextCtrl (wxRichTextCtrl *ctrl)
| Associates the control with a wxRichTextCtrl.
void | SetStyleSheet (wxRichTextStyleSheet *styleSheet)
| Associates the control with a style sheet.
void | SetStyleType (wxRichTextStyleListBox::wxRichTextStyleType styleType)
| Sets the style type to display.
void | UpdateStyles ()
| Updates the style list box.
| wxRichTextStyleListCtrl (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
| Constructors.
| wxRichTextStyleListCtrl ()
| Constructors.

List of all members.

## Constructor & Destructor Documentation

wxRichTextStyleListCtrl::wxRichTextStyleListCtrl | ( | wxWindow * | parent,
|  | wxWindowID | id = `wxID_ANY`,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0` |
| ) |  |  |

Constructors.

wxRichTextStyleListCtrl::wxRichTextStyleListCtrl | ( |  | ) |

Constructors.

## Member Function Documentation

bool wxRichTextStyleListCtrl::Create | ( | wxWindow * | parent,
|  | wxWindowID | id = `wxID_ANY`,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0` |
| ) |  |  |

Creates the windows.

wxRichTextCtrl* wxRichTextStyleListCtrl::GetRichTextCtrl | ( |  | ) | const

Returns the associated rich text control, if any.

wxChoice* wxRichTextStyleListCtrl::GetStyleChoice | ( |  | ) | const

Returns the wxChoice control used for selecting the style category.

wxRichTextStyleListBox* wxRichTextStyleListCtrl::GetStyleListBox | ( |  | ) | const

Returns the wxListBox control used to view the style list.

wxRichTextStyleSheet* wxRichTextStyleListCtrl::GetStyleSheet | ( |  | ) | const

Returns the associated style sheet, if any.

wxRichTextStyleListBox::wxRichTextStyleType wxRichTextStyleListCtrl::GetStyleType | ( |  | ) | const

Returns the type of style to show in the list box.

void wxRichTextStyleListCtrl::SetRichTextCtrl | ( | wxRichTextCtrl * | ctrl | ) |

Associates the control with a wxRichTextCtrl.

void wxRichTextStyleListCtrl::SetStyleSheet | ( | wxRichTextStyleSheet * | styleSheet | ) |

Associates the control with a style sheet.

void wxRichTextStyleListCtrl::SetStyleType | ( | wxRichTextStyleListBox::wxRichTextStyleType | styleType | ) |

Sets the style type to display.

One of

- wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL,
- wxRichTextStyleListBox::wxRICHTEXT_STYLE_PARAGRAPH,
- wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER
- wxRichTextStyleListBox::wxRICHTEXT_STYLE_LIST.

void wxRichTextStyleListCtrl::UpdateStyles | ( |  | ) |

Updates the style list box.

|  | [ top ]