<div dir="ltr"><div><div><div><div><div>I am working on a manufacturing system to asynchronously program and test 16 USB devices. The main display is a grid of "slot" displays. Each slot display currently is a group box with the slot number in big digits, a status message in normal sized text, and a guage to display the progress. I'd like to change the background color of the group box for each slot depending on the status. E.g. red for a problem, green for success, yellow - in progress, etc..<br>
<br></div>The problem is that setting a background color only seems to be possible with a canvas%. I seem to have two options:<br></div>1) Use a canvas for the slot and draw all of the contents.<br></div>2) Create a subclass of panel% that can position a canvas behind the rest of the children.<br>
<br></div>In the previous implementation option #1 was used because I needed to work around another issue. We used a collection of BeagleBones with small LCD displays to drive the slots, one computer per slot. I had to roll my own classes to deal with the display physically rotated 90 degrees from normal. (The X server did not support rotating the display.) I used a canvas filling the top-level frame, and then my rotated-text% and progress-bar% classes used absolute positioning and sizing. The draw operation on the canvas filled the background, applied a rotation transformation to the dc and then for each child it applied the appropriate translation to the position of the child and told the child object to draw with the rotated & translated device context.<br>
</div><div><div><div><div><div><div><div><div><br>Comments or suggestions?<br><br></div><div></div><div><div><div>-- David<br></div>
</div></div></div></div></div></div></div></div></div></div>