Added wxComboCtrl::SetHint(), GetHint()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1089,7 +1089,20 @@ void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc,
|
||||
{
|
||||
if ( flags & wxODCB_PAINTING_CONTROL )
|
||||
{
|
||||
dc.DrawText( GetValue(),
|
||||
wxString text;
|
||||
|
||||
if ( !ShouldUseHintText() )
|
||||
{
|
||||
text = GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
text = GetHint();
|
||||
wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
||||
dc.SetTextForeground(col);
|
||||
}
|
||||
|
||||
dc.DrawText( text,
|
||||
rect.x + GetMargins().x,
|
||||
(rect.height-dc.GetCharHeight())/2 + rect.y );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user