SPLat Logo

Z-Index

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

Z-Index

The HMI430 supports z-indexnig, which means it allows things to be drawn on top of or under each other.  In its simplest form, it means you can have a background image and draw text and buttons on top.

In the HMI430, z-ordering is organised as per this table, working from top-most to bottom-most:

z-ordertypeitem
254 - Top-most
128 fixed Text, HBar   
96 moveable Button   
64 moveable Image (not background image)   
32 fixed Background image
0 - Bottom-most

As the table shows, text and hbar are all drawn on z-order 128 and can't be changed.  So #HMI Print() will always print with a z-order of 128 and by default this means it will print on top of buttons and images.  Note text is currently not managed, so pressing the buttons or moving the image will erase any text on top.

The background image is set via #HMI Reset() and is also at a fixed z-order.  If your background image has transparency, then you may draw images "under" it.  This isn't a typical thing to do.

Buttons and images may be drawn at any z-order.  If you don't specify the z-order, then the default will be applied.  Note, you can change the z-order after you've created the button or image and it will move to the new level.