Garmin Fleet Management Controller  2.19.0
CColoredListBox Class Reference

A CListBox that highlights list items matching a search string. More...

#include <CColoredListBox.h>

+ Inheritance diagram for CColoredListBox:

Public Member Functions

void DrawItem (LPDRAWITEMSTRUCT aDrawItem)
 Draw the list item specified by aDrawItem. More...
 
CString getSearchString () const
 Get the search string being used. More...
 
void setSearchString (CString aSearchString)
 Set the search string to use. More...
 

Protected Attributes

BOOL mHasSearchString
 If true, a search string was specified. More...
 
CString mSearchString
 The search string to match. More...
 

Detailed Description

A CListBox that highlights list items matching a search string.

Definition at line 19 of file CColoredListBox.h.

Member Function Documentation

void CColoredListBox::DrawItem ( LPDRAWITEMSTRUCT  aDrawItem)

Draw the list item specified by aDrawItem.

Draw the list item. If the item text contains the search string, draw the item as black text on a yellow background; if the search text is empty or not found, draw the item as black text on a white background. However, if the item is highlighted, use the system colors for a highlighted item.

Note
This is an override of CListBox::DrawItem().
Parameters
aDrawItemThe structure representing the item to draw.

Definition at line 23 of file CColoredListBox.cpp.

CString CColoredListBox::getSearchString ( ) const

Get the search string being used.

Returns
A lowercase representation of the search string.

Definition at line 75 of file CColoredListBox.cpp.

References mSearchString.

void CColoredListBox::setSearchString ( CString  aSearchString)

Set the search string to use.

Parameters
aSearchStringThe new search string

Definition at line 84 of file CColoredListBox.cpp.

References mSearchString.

Member Data Documentation

BOOL CColoredListBox::mHasSearchString
protected

If true, a search string was specified.

Definition at line 39 of file CColoredListBox.h.

CString CColoredListBox::mSearchString
protected

The search string to match.

Definition at line 36 of file CColoredListBox.h.

Referenced by getSearchString(), and setSearchString().


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