TQListBoxText Class

Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQListBoxText Class Reference

The TQListBoxText class provides list box items that display text. More...

`#include <ntqlistbox.h>`

Inherits TQListBoxItem.

List of all member functions.

## Public Members

- TQListBoxText ( TQListBox * listbox, const TQString & text = TQString::null )
- TQListBoxText ( const TQString & text = TQString::null )
- TQListBoxText ( TQListBox * listbox, const TQString & text, TQListBoxItem * after )
- ~TQListBoxText ()
- virtual int height ( const TQListBox * lb ) const
- virtual int width ( const TQListBox * lb ) const

## Protected Members

- virtual void paint ( TQPainter * painter )

## Detailed Description

The TQListBoxText class provides list box items that display text.

The text is drawn in the widget's current font. If you need several different fonts, you must implement your own subclass of TQListBoxItem.

See also TQListBox, TQListBoxItem, and Advanced Widgets.

## Member Function Documentation

### TQListBoxText::TQListBoxText ( TQListBox * listbox, const TQString & text = TQString::null )

Constructs a list box item in list box listbox showing the text text.

### TQListBoxText::TQListBoxText ( const TQString & text = TQString::null )

Constructs a list box item showing the text text.

### TQListBoxText::TQListBoxText ( TQListBox * listbox, const TQString & text, TQListBoxItem * after )

Constructs a list box item in list box listbox showing the text text. The item is inserted after the item after, or at the beginning if after is 0.

### TQListBoxText::~TQListBoxText ()

Destroys the item.

### int TQListBoxText::height ( const TQListBox * lb ) const`[virtual]`

Returns the height of a line of text in list box lb.

See also paint() and width().

Reimplemented from TQListBoxItem.

### void TQListBoxText::paint ( TQPainter * painter )`[virtual protected]`

Draws the text using painter.

Reimplemented from TQListBoxItem.

### int TQListBoxText::width ( const TQListBox * lb ) const`[virtual]`

Returns the width of this line in list box lb.

See also paint() and height().

Reimplemented from TQListBoxItem.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.