text,
*dc,
GetEllipsizeMode(),
- rect.width,
+ rectText.width,
wxELLIPSIZE_FLAGS_NONE
);
}
+ // get the alignment to use
+ int align = GetAlignment();
+ if ( align == wxDVR_DEFAULT_ALIGNMENT )
+ {
+ // if we don't have an explicit alignment ourselves, use that of the
+ // column in horizontal direction and default vertical alignment
+ align = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL;
+ }
+
dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText,
- rectText, GetAlignment());
+ rectText, align);
}
//-----------------------------------------------------------------------------
void wxDataViewListStore::DeleteItem( unsigned int row )
{
wxVector<wxDataViewListStoreLine*>::iterator it = m_data.begin() + row;
+ delete *it;
m_data.erase( it );
RowDeleted( row );
return node->GetItem();
}
+bool wxDataViewTreeStore::IsContainer( const wxDataViewItem& item ) const
+{
+ wxDataViewTreeStoreNode *node = FindNode( item );
+ if (!node) return false;
+
+ return node->IsContainer();
+}
+
wxDataViewItem wxDataViewTreeStore::GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
{
wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent );
return parent->GetItem();
}
-bool wxDataViewTreeStore::IsContainer( const wxDataViewItem &item ) const
-{
- wxDataViewTreeStoreNode *node = FindNode( item );
- if (!node) return false;
-
- return node->IsContainer();
-}
-
unsigned int wxDataViewTreeStore::GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const
{
wxDataViewTreeStoreContainerNode *node = FindContainerNode( item );