I have a list of dicts, and am plotting the list in a data grid. Because each dict would overflow the grid cell, I decided to put a button in each DataRowPanel, and then make it so that when a user hovers on the cell, it displays the rest of the dictionary content.
However, I’m repeatedly met with object has no attribute 'popper'
for when I try to 1. put the button in the repeating panel and then have the dictionary info display on hover (in which the error is becomes that the button object has no attribute) and 2. just put the dictionary into the repeating panel with no button but still implement a hoverover feature.
My code is
for i, d in enumerate(list_of_dicts):
self.button = Button(text = foo) # foo already defined outside loop
row = i % self.rows # rows and columns are unimportant, already work with populating grid
column = i // self.rows
rp.items[row][column] = self.button
self.button.popover(dictionary,
placement = 'bottom',
animation = False,
trigger = 'stickyhover')
# Populate cells one at a time
rp.items = rp.items
time.sleep(0.5)
def button_click(self, **event_args):
self.button.pop('toggle')
sleep(.1)
I’m essentially following what was done in Stu’s example here since I’m still a bit new to both the feature and the documentation that comes with it.