-// ============================================================================
-// list box control implementation
-// ============================================================================
+ // In this sample we handle the "selected" state; all others fall through to our "active" state
+ if ( itemState == kDataBrowserItemIsSelected )
+ {
+ ThemeBrush colorBrushID;
+
+ Gestalt( gestaltSystemVersion, &systemVersion );
+
+ // TODO: switch over to wxSystemSettingsNative::GetColour() when kThemeBrushSecondaryHighlightColor is incorporated
+ // Panther DB starts using kThemeBrushSecondaryHighlightColor for inactive browser hilighting
+ if ( (systemVersion >= 0x00001030) && !IsControlActive( browser ) )
+ colorBrushID = kThemeBrushSecondaryHighlightColor;
+ else
+ colorBrushID = kThemeBrushPrimaryHighlightColor;
+
+ // First paint the hilite rect, then the text on top
+ SetThemePen( colorBrushID, 32, true );
+ PaintRect( itemRect );
+ SetThemeDrawingState( themeState , false ) ;
+ }
+
+ DrawThemeTextBox( cfString, kThemeApplicationFont, kThemeStateActive, true, itemRect, teFlushDefault, NULL );
+ SetThemeDrawingState( themeState , true ) ;
+
+ if ( cfString != NULL )
+ CFRelease( cfString );
+}