Exemplo n.º 1
0
// Fills a previously hidden column with items. Acts
// as a SetColumnWidth if width is nonzero.
void CGameListCtrl::ShowColumn(int column, int width)
{
	// Fill the column with items if it was hidden
	if (GetColumnWidth(column) == 0)
	{
		for (int i = 0; i < GetItemCount(); i++)
		{
			UpdateItemAtColumn(i, column);
		}
	}
	SetColumnWidth(column, width);
}
Exemplo n.º 2
0
void CGameListCtrl::InsertItemInReportView(long _Index)
{
	// When using wxListCtrl, there is no hope of per-column text colors.
	// But for reference, here are the old colors that were used: (BGR)
	// title: 0xFF0000
	// company: 0x007030

	// Insert a first row with nothing in it, that will be used as the Index
	long ItemIndex = InsertItem(_Index, wxEmptyString);

	// Iterate over all columns and fill them with content if they are visible
	for (int i = 1; i < NUMBER_OF_COLUMN; i++)
	{
		if (GetColumnWidth(i) != 0)
			UpdateItemAtColumn(_Index, i);
	}

	// Background color
	SetBackgroundColor();

	// Item data
	SetItemData(_Index, ItemIndex);
}