Hello Ignition wizards,
I’d kindly like to ask you for help regarding PowerTable. What would be the most ultimate coolest thing: As cursor is being moved across the PowerTable, the rows of the powertable would change colors according to cursor’s position (e.g. cursor is on 10th row, let’s make this row colored differently).
What I’ve done so far is that when user clicks on particular row, it’s being colored differently, but with one drawback - only the cells to the right from the clicked cell on this row are being colored. The cells on the left don’t do anything as can be seen here:
.The table itself has custom property called highlightedRow. This property is being reseted with propertyChange and configureCell looks as follows:
def configureCell(..parameters here..):
if selected:
self.highlightRow = rowView
if rowView == self.highlightRow:
return {'background':system.gui.color(250,214,138)}
if selected==False:
if colView == 5:
return {'background':system.gui.color(255,255,0,50)}#total: light yellow
elif colView in range(6,10):
return {'background':system.gui.color(244,139,244,60)} #FV, FT, FU, FJ: pink
elif colView in range(10,12):
return {'background':system.gui.color(149,79,15,90)} #FI, FG: light brown
elif colView in range(12,14):
return {'background':system.gui.color(149,79,15,50)} #FO, FM: very light brown
elif colView == 17:
return {'background':system.gui.color(0,255,0,50)} #niO: light green
elif colView == 16:
return {'background':system.gui.color(255,0,0,50)} #iO: light red
else:
return {'background':'white'}
… i know this is not a state of art approach, but did not think of anything better so far. Thanks in advance for the advices.
P.S. mouseMoved() handler does not work as it is not fired with every move of the cursor.
Take care, thank you all in advance.