Facility Control

 View Only
  • 1.  Change constraint button colors

    Posted 04-06-2023 13:57

    I've got a panel I've built out with buttons copied over from the live assist ME busses of a carbonite. The buttons present as parameter constraints. I'm looking for a way to customize the color of the buttons, but can't exactly figure it out. I'm looking to change colors on individual buttons, not the entire set of buttons. Current code below.

    <abs name="MiniME1" virtualheight="164" virtualwidth="928">
             <simplegrid contexttype="opengear" height="138" left="15" objectid="Carbonite 00:0F:9B:04:08:29&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" rows="1" top="14" width="903">
                <simplegrid baseurl="http://10.4.10.103/tmp/busestab.xml" cols="12" contexttype="opengear" ipaddress="10.4.10.103:5253" objectid="Carbonite 00:0F:9B:04:08:29&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" rows="0" subscriptions="false">
                   <param constrainttype="INT_CHOICE" expand="true" height="60" mid="48252" oid="0xF97" precision="0" style="style:toggleButton;" width="101">
                      <constraint key="1010">GLD CLN</constraint>
                      <constraint key="1011">SLR CLN</constraint>
                      <constraint key="1018">CG1</constraint>
                      <constraint key="1020">CG2</constraint>
                      <constraint key="1022">CLIPS</constraint>
                      <constraint key="0">BK</constraint>
                      <constraint key="11000">PGM</constraint>
                      <constraint key="11001">PRV</constraint>
                      <constraint key="11100">ME 1</constraint>
                      <constraint key="11101">ME1PV</constraint>
                      <constraint key="11200">ME 2</constraint>
                      <constraint key="11201">ME2PV</constraint>
                      <constraint key="25000">MinME1</constraint>
                      <constraint key="25100">MinME2</constraint>
                      <constraint key="25200">MinME3</constraint>
                      <constraint key="25300">MinME4</constraint>
                   </param>
                </simplegrid>
             </simplegrid>
          </abs>
    


    ------------------------------
    Chris Schaaf
    ------------------------------


  • 2.  RE: Change constraint button colors

    Posted 04-13-2023 07:27

    Hi Chris
    Your easiest path is to embed the color information into each entry.  You can do this by adding style data at the end of the text inside of "<"...">".

    <abs name="MiniME1" virtualheight="164" virtualwidth="928">
             <simplegrid contexttype="opengear" height="138" left="15" objectid="Carbonite 00:0F:9B:04:08:29&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" rows="1" top="14" width="903">
                <simplegrid baseurl="http://10.4.10.103/tmp/busestab.xml" cols="12" contexttype="opengear" ipaddress="10.4.10.103:5253" objectid="Carbonite 00:0F:9B:04:08:29&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" rows="0" subscriptions="false">
                   <param constrainttype="INT_CHOICE" expand="true" height="60" mid="48252" oid="0xF97" precision="0"  width="101">
                      <constraint key="1010">GLD CLN&lt;f:bg#0000FF;t:bg#FF0000&gt;</constraint>
                      <constraint key="1011">SLR CLN&lt;f:bg#00FF00;t:bg#FFFF00&gt;</constraint>
                      <constraint key="1018">CG1</constraint>
                      <constraint key="1020">CG2</constraint>
                      <constraint key="1022">CLIPS</constraint>
                      <constraint key="0">BK</constraint>
                      <constraint key="11000">PGM</constraint>
                      <constraint key="11001">PRV</constraint>
                      <constraint key="11100">ME 1</constraint>
                      <constraint key="11101">ME1PV</constraint>
                      <constraint key="11200">ME 2</constraint>
                      <constraint key="11201">ME2PV</constraint>
                      <constraint key="25000">MinME1</constraint>
                      <constraint key="25100">MinME2</constraint>
                      <constraint key="25200">MinME3</constraint>
                      <constraint key="25300">MinME4</constraint>
                   </param>
                </simplegrid>
             </simplegrid>
          </abs>
    



    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 3.  RE: Change constraint button colors

    Posted 04-13-2023 14:03

    @James Peltzer  I added the style data as you had above and it didn't do anything. It didn't case errors, but it didn't change the color either. Am I possibly missing something?



    ------------------------------
    Chris Schaaf
    ------------------------------



  • 4.  RE: Change constraint button colors

    Posted 04-14-2023 16:55

    Hi Chris
    Sorry about that - I did the example quickly and without having access to a Carbonite to verify against. In my haste, I missed a semicolon between the 2 style attributes.  This is what the <param/> should look like (I have also updated the example above to correct the issue):

          <param constrainttype="INT_CHOICE" expand="true" height="60" mid="48252" oid="0xF97" precision="0" width="101">
             <constraint key="1010">GLD CLN&lt;f:bg#0000FF;t:bg#FF0000&gt;</constraint>
             <constraint key="1011">SLR CLN&lt;f:bg#00FF00;t:bg#FFFF00&gt;</constraint>
             <constraint key="1018">CG1</constraint>
             <constraint key="1020">CG2</constraint>
             <constraint key="1022">CLIPS</constraint>
             <constraint key="0">BK</constraint>
             <constraint key="11000">PGM</constraint>
             <constraint key="11001">PRV</constraint>
             <constraint key="11100">ME 1</constraint>
             <constraint key="11101">ME1PV</constraint>
             <constraint key="11200">ME 2</constraint>
             <constraint key="11201">ME2PV</constraint>
             <constraint key="25000">MinME1</constraint>
             <constraint key="25100">MinME2</constraint>
             <constraint key="25200">MinME3</constraint>
             <constraint key="25300">MinME4</constraint>
          </param>



    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 5.  RE: Change constraint button colors

    Posted 04-14-2023 17:26

    @James Peltzer It is still not changing the button color (or any attributes for that matter)



    ------------------------------
    Chris Schaaf
    ------------------------------



  • 6.  RE: Change constraint button colors

    Posted 04-14-2023 18:40

    One more try - the original example also was still referencing the toggle button defined style and this was overriding the custom colors. When I remove the style="style:toggleButton" attribute, it works for me.



    ------------------------------
    James Peltzer
    Ross Video
    ------------------------------



  • 7.  RE: Change constraint button colors

    Posted 04-15-2023 09:17

    Bingo! That did it! Thank you!



    ------------------------------
    Chris Schaaf
    ------------------------------