# Multi State Button

**URL:** <https://forum.inductiveautomation.com/t/multi-state-button/1697>\
**Category:** Ignition\
**Created:** [March 28, 2010, 5:13am UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697 "2010-03-28T05:13:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [March 28, 2010, 5:13am UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/1 "2010-03-28T05:13:17Z")

</div>

Is there a way to set the colors of the buttons to a matte color instead of the gradient color? I am using it as a color-picker, and the gradient kind of distorts the true RGB color.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [March 28, 2010, 5:37am UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/2 "2010-03-28T05:37:42Z")

</div>

Why not just use a square box? Thats what I do.

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [March 28, 2010, 12:23pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/3 "2010-03-28T12:23:55Z")

</div>

Because I don’t know how many colors I need to display ahead of time, and they can add or subtract from the “official” color choices that are available to the rest of the app at any time. So, even if I dropped 100 boxes in a container, I’d be screwed as soon as they needed 101.

So, I bind the number of allowable colors from a table (created with the real color chooser) to a multistate button, and bind the square root of the quantity to the rows, and the quantity divided by the square root of the quantity to the columns. When new colors are added or colors are dropped, the number of buttons in the grid refreshes automatically. And by binding the styles to properties from the database and ignoring the indicator value, I can have multiple buttons selected at the same time. It looks really cool and works great, except for the darn gradient color. 🙂

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 29, 2010, 5:35pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/4 "2010-03-29T17:35:29Z")

</div>

I can add a “Button Background 3D” property onto the multi state button like the standard button so you can have a flat background.

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [March 29, 2010, 6:35pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/5 "2010-03-29T18:35:22Z")

</div>

Thanks, that will do the trick.

Also, on a side note, is there something wrong with the ‘paste to dataset from clipboard’ in general? I can copy to the clipboard, but not paste from it. Am I doing something wrong? It happened to me with the styles on the multi state button, and another dataset on a different component.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 31, 2010, 4:47pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/6 "2010-03-31T16:47:37Z")

</div>

The copy-paste of datasets seems to work for me - any hints on how to reproduce this problem?

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 2, 2010, 12:05am UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/7 "2010-04-02T00:05:42Z")

</div>

OK, if I open a datataset, click on the copy icon, paste it to text pad, change something, copy from textpad, and then use the paste icon on the dataset, nothing happens.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 2, 2010, 3:55am UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/8 "2010-04-02T03:55:01Z")

</div>

Ah, thats what I suspected. It doesn’t actually work if you pass it through a text editor. The underlying reason is somewhat pedantic so I won’t bore you with it, but suffice to say that it doesn’t accept text when pasting. This would be an obvious improvement.

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 2, 2010, 1:25pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/9 "2010-04-02T13:25:51Z")

</div>

That would be great. I haven’t found a good reason to paste from another dataset, but it would be really nice (especially with styles) to copy the dataset to a text editor where it would be a lot faster to modify the data, and bring it back in from there.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 2, 2010, 3:52pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/10 "2010-04-02T15:52:21Z")

</div>

Yeah, the tricky part about this is that when pasting from CSV, we’ve lost one important piece of information - the datatype of the columns. It would have to guess, which always rubs me the wrong way…

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 2, 2010, 4:05pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/11 "2010-04-02T16:05:07Z")

</div>

But, the columns already exist, so wouldn’t it already know the data type and just parse it in? All I really want to do is paste the data, not the entire dataset. Maybe you could just add a rule where you allow pasting if the column names in the clipboard match the column names in the dataset, which probably indicates that you copied from the dataset first anyway.

Anyway, I’ll shut up now. I’m just being way too picky. 🙂

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 2, 2010, 4:26pm UTC](https://forum.inductiveautomation.com/t/multi-state-button/1697/12 "2010-04-02T16:26:48Z")

</div>

Yeah, thats a good idea - use the dataset you’re pasting into as a guide, I like that.
