TableHeaderComponent request


Hey Jules can you give us a getColumnWidth(const int columnId) method?

I know we have the restoreFromString methods in this class, but it would be really useful to me!

int TableHeaderComponent::getColumnWidth(const int columnId) const throw()
	const ColumnInfo* const ci = getInfoForId (columnId);
    return ci != 0 ? ci->width : 0;



Can’t you just use getColumnPosition().getWidth() ?


From tableColumnsResized(TableHeaderComponent* tableHeader) it’d be useful…

for (int i=0;igetNumColumns(true);i++)
int idIndex=tableHeader->getColumnIdOfIndex(i,true);
int columnSize=tableHeader->getColumnWidth(idIndex);
//do something with it here



…yeah, but what’s wrong with:



:oops: Shucks, I missed that…what a silly bugger I am…


Another request for the same :slight_smile: : Could you make showColumnChooserMenu virtual and protected so that I can override it (showing my own native popup menu impl) ? Alternatively, add a method to lookandfeel called showPopupMenu(const PopupMenu&, int screenX, int screenY) so all PopupMenu’s work the same way?


I like your L+F suggestion, but there are quite a few show() variations that would all need to be handled, and it’d be a bit messy. I’ve no objection to making that method virtual though, so will do that…