TUIButton in tableview header. Popup Menu not showing #90

Closed
erndev opened this Issue Dec 13, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@erndev

erndev commented Dec 13, 2011

I am using a a TUITableView, with one header and several cells.
The header view has a TuiButton with a menu. First time the table view is loaded, the button displays the menu.

But i found a problem whenever i reload the data. If i reload the data, the button won't display the menu any more.
Debugging, i can see that the mousedown is catched, and that the call to the popUpMenuPositioningItem function is done.
But no menu is shown.
If just after that i resize the window, even a little bit, and then i click again in the button, the menu shows just fine.

I've done another test displaying a popup menu when mousedown is detected in the header view of the table, and the same happens. I need to resize the window after "reloadData" in order to be able to show the popup menu.

@erndev erndev closed this Dec 13, 2011

@erndev erndev reopened this Dec 13, 2011

@erndev

This comment has been minimized.

Show comment
Hide comment
@erndev

erndev Dec 13, 2011

Well, problem solved.
If someone else faces this problem, what was happening is that i was changing the button menu (which is in the table view header) after calling reloadData. If i set the menu in the datasource methods when the header view is requested, everything seems fine.

erndev commented Dec 13, 2011

Well, problem solved.
If someone else faces this problem, what was happening is that i was changing the button menu (which is in the table view header) after calling reloadData. If i set the menu in the datasource methods when the header view is requested, everything seems fine.

@erndev erndev closed this Dec 13, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment