How to pixel constrain Button Appearance given as images?











up vote
4
down vote

favorite
1












Using the images:



images = Uncompress["1:eJztWs2O0zAQrviREOLAiTtIuebMgQvmgFbi5MItlwKhWmnpojoL2nfIJc/QB8iL9J2Mm8bx2GOnbtKoUeKVvirx7/d5ZtzOaN9+v6e/niwWC/ZMfHy5ZZnxdnhgz8XHze/VOj12vhAfdPXv43a7ely+Fi/fNux2vUl/3myydJ1u339/KhrfCHwQOKwg/vjcsN/vZ4Ggd9oIeqcNl96CyruM8mJQDgWn1T4xZ+V19JYsBnf3ZfXKtWkxHr3StorT5TDk2l30Kj+uETNelozH9TOj0uYlZ7E+Vtcg7VaDMjS+WrsZB/3ImAv7AJeyoM2YmJVODZDXWXq1/U1O0Cctfd56beuC/kZvbOEk+sEZ+Oi1+lyj1x1jcE4T/5WeU/6s68VzlR9VcxAXPf7V3WO/d87SC/kjm6s5bTHqqxf6p9aGuMjzcPmWbqOuevUxug2aM6ZFZ71qrsO+Tr14L8ijq179O8uIFZvt6z21+6FX/Nr12nhBX+nsz5CX0OKOeeOMYXvf+9lHr+Fj4ffktBH0Thtz1TsnLA9FSvKYpar6SR/uUvZSPHy6v7vfLv+sfqTLQ1mTfibGoFfi4VD53N6lq7+3m3XV83X7kPYsnr5bjK94OhbnDDwCj8DjCFxgug6PtqQS8fAoeuCCi5HA1O8qAaecWgsUPjwcxQhHMnTkCRN5mFTgQpI3j1NFAjOpkesaRRNb8ehsu1Rtp5O7hXU8PMMBeVgSes0nBj6PtiKLZsMCF6RwIt6Dx97OhRbAHihe6rVQgnyd+6MNgUfg4cNjDBgomQj/l3EZ7Ha7WSDonTaC3mnDpTcj8i4jPBuUQ8ZJtU/Ek/w6evMkAnf3ZfXKtUk2Hr3StorT5TDk2l30Kj+uESU8zxMe1c8JkTbPeRLpY3UN0m41SILGV2s346AfGXNhH+CSZ6QZEyW5UwPkdZZebX+TE/RJS5+3Xtu6oL/RG1k4iX5wBj56rT7X6HXHGJzTxH+l55Q/63rxXOVH1RzERY9/dffY752z9EL+yOZqTluM+uqF/qm1IS7yPFy+pduoq159jG6D5oxJ1lmvmuuwr1Mv3gvy6KpX/84yYsVm+3pP7X7oFb92vTZe0Fc6+zPkJbS4Y944Y9je93720Wv4WPg9OW0EvdPGXPXOCeH/MjwxFucMPAKPwOMIXGC6Do+2pBLx8Ch64IKLkcDU7yoBJ5xYCxQ+PBzFCEcydOQJE3mYVOBCkjePU0UCM6mR6xpFE1vx6Gy7VG2nk7uFdTw8wwF5WBJ6zScGPo+2IotmwwwXpHAi3oPHzs6FZMAeKF7qtVCCfJ37ow2BR+Dhw2MMGCaZ+A/deCl0"]


the following buttons appears without scaling in a list:



buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}] &, images]


However when putting them in a Multicolumn, they scale badly to match sizes.



Multicolumn[buttons, 1]




I want them to align center left with the same size as they appear in the List.

Neither Magnification -> 1 in the images nor Grid with Alignment -> Left fixed it.

How to make a grid of such buttons without scaling images?



All images have the same vertical size if that matters.










share|improve this question


























    up vote
    4
    down vote

    favorite
    1












    Using the images:



    images = Uncompress["1:eJztWs2O0zAQrviREOLAiTtIuebMgQvmgFbi5MItlwKhWmnpojoL2nfIJc/QB8iL9J2Mm8bx2GOnbtKoUeKVvirx7/d5ZtzOaN9+v6e/niwWC/ZMfHy5ZZnxdnhgz8XHze/VOj12vhAfdPXv43a7ely+Fi/fNux2vUl/3myydJ1u339/KhrfCHwQOKwg/vjcsN/vZ4Ggd9oIeqcNl96CyruM8mJQDgWn1T4xZ+V19JYsBnf3ZfXKtWkxHr3StorT5TDk2l30Kj+uETNelozH9TOj0uYlZ7E+Vtcg7VaDMjS+WrsZB/3ImAv7AJeyoM2YmJVODZDXWXq1/U1O0Cctfd56beuC/kZvbOEk+sEZ+Oi1+lyj1x1jcE4T/5WeU/6s68VzlR9VcxAXPf7V3WO/d87SC/kjm6s5bTHqqxf6p9aGuMjzcPmWbqOuevUxug2aM6ZFZ71qrsO+Tr14L8ijq179O8uIFZvt6z21+6FX/Nr12nhBX+nsz5CX0OKOeeOMYXvf+9lHr+Fj4ffktBH0Thtz1TsnLA9FSvKYpar6SR/uUvZSPHy6v7vfLv+sfqTLQ1mTfibGoFfi4VD53N6lq7+3m3XV83X7kPYsnr5bjK94OhbnDDwCj8DjCFxgug6PtqQS8fAoeuCCi5HA1O8qAaecWgsUPjwcxQhHMnTkCRN5mFTgQpI3j1NFAjOpkesaRRNb8ehsu1Rtp5O7hXU8PMMBeVgSes0nBj6PtiKLZsMCF6RwIt6Dx97OhRbAHihe6rVQgnyd+6MNgUfg4cNjDBgomQj/l3EZ7Ha7WSDonTaC3mnDpTcj8i4jPBuUQ8ZJtU/Ek/w6evMkAnf3ZfXKtUk2Hr3StorT5TDk2l30Kj+uESU8zxMe1c8JkTbPeRLpY3UN0m41SILGV2s346AfGXNhH+CSZ6QZEyW5UwPkdZZebX+TE/RJS5+3Xtu6oL/RG1k4iX5wBj56rT7X6HXHGJzTxH+l55Q/63rxXOVH1RzERY9/dffY752z9EL+yOZqTluM+uqF/qm1IS7yPFy+pduoq159jG6D5oxJ1lmvmuuwr1Mv3gvy6KpX/84yYsVm+3pP7X7oFb92vTZe0Fc6+zPkJbS4Y944Y9je93720Wv4WPg9OW0EvdPGXPXOCeH/MjwxFucMPAKPwOMIXGC6Do+2pBLx8Ch64IKLkcDU7yoBJ5xYCxQ+PBzFCEcydOQJE3mYVOBCkjePU0UCM6mR6xpFE1vx6Gy7VG2nk7uFdTw8wwF5WBJ6zScGPo+2IotmwwwXpHAi3oPHzs6FZMAeKF7qtVCCfJ37ow2BR+Dhw2MMGCaZ+A/deCl0"]


    the following buttons appears without scaling in a list:



    buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}] &, images]


    However when putting them in a Multicolumn, they scale badly to match sizes.



    Multicolumn[buttons, 1]




    I want them to align center left with the same size as they appear in the List.

    Neither Magnification -> 1 in the images nor Grid with Alignment -> Left fixed it.

    How to make a grid of such buttons without scaling images?



    All images have the same vertical size if that matters.










    share|improve this question
























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      Using the images:



      images = Uncompress["1:eJztWs2O0zAQrviREOLAiTtIuebMgQvmgFbi5MItlwKhWmnpojoL2nfIJc/QB8iL9J2Mm8bx2GOnbtKoUeKVvirx7/d5ZtzOaN9+v6e/niwWC/ZMfHy5ZZnxdnhgz8XHze/VOj12vhAfdPXv43a7ely+Fi/fNux2vUl/3myydJ1u339/KhrfCHwQOKwg/vjcsN/vZ4Ggd9oIeqcNl96CyruM8mJQDgWn1T4xZ+V19JYsBnf3ZfXKtWkxHr3StorT5TDk2l30Kj+uETNelozH9TOj0uYlZ7E+Vtcg7VaDMjS+WrsZB/3ImAv7AJeyoM2YmJVODZDXWXq1/U1O0Cctfd56beuC/kZvbOEk+sEZ+Oi1+lyj1x1jcE4T/5WeU/6s68VzlR9VcxAXPf7V3WO/d87SC/kjm6s5bTHqqxf6p9aGuMjzcPmWbqOuevUxug2aM6ZFZ71qrsO+Tr14L8ijq179O8uIFZvt6z21+6FX/Nr12nhBX+nsz5CX0OKOeeOMYXvf+9lHr+Fj4ffktBH0Thtz1TsnLA9FSvKYpar6SR/uUvZSPHy6v7vfLv+sfqTLQ1mTfibGoFfi4VD53N6lq7+3m3XV83X7kPYsnr5bjK94OhbnDDwCj8DjCFxgug6PtqQS8fAoeuCCi5HA1O8qAaecWgsUPjwcxQhHMnTkCRN5mFTgQpI3j1NFAjOpkesaRRNb8ehsu1Rtp5O7hXU8PMMBeVgSes0nBj6PtiKLZsMCF6RwIt6Dx97OhRbAHihe6rVQgnyd+6MNgUfg4cNjDBgomQj/l3EZ7Ha7WSDonTaC3mnDpTcj8i4jPBuUQ8ZJtU/Ek/w6evMkAnf3ZfXKtUk2Hr3StorT5TDk2l30Kj+uESU8zxMe1c8JkTbPeRLpY3UN0m41SILGV2s346AfGXNhH+CSZ6QZEyW5UwPkdZZebX+TE/RJS5+3Xtu6oL/RG1k4iX5wBj56rT7X6HXHGJzTxH+l55Q/63rxXOVH1RzERY9/dffY752z9EL+yOZqTluM+uqF/qm1IS7yPFy+pduoq159jG6D5oxJ1lmvmuuwr1Mv3gvy6KpX/84yYsVm+3pP7X7oFb92vTZe0Fc6+zPkJbS4Y944Y9je93720Wv4WPg9OW0EvdPGXPXOCeH/MjwxFucMPAKPwOMIXGC6Do+2pBLx8Ch64IKLkcDU7yoBJ5xYCxQ+PBzFCEcydOQJE3mYVOBCkjePU0UCM6mR6xpFE1vx6Gy7VG2nk7uFdTw8wwF5WBJ6zScGPo+2IotmwwwXpHAi3oPHzs6FZMAeKF7qtVCCfJ37ow2BR+Dhw2MMGCaZ+A/deCl0"]


      the following buttons appears without scaling in a list:



      buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}] &, images]


      However when putting them in a Multicolumn, they scale badly to match sizes.



      Multicolumn[buttons, 1]




      I want them to align center left with the same size as they appear in the List.

      Neither Magnification -> 1 in the images nor Grid with Alignment -> Left fixed it.

      How to make a grid of such buttons without scaling images?



      All images have the same vertical size if that matters.










      share|improve this question













      Using the images:



      images = Uncompress["1:eJztWs2O0zAQrviREOLAiTtIuebMgQvmgFbi5MItlwKhWmnpojoL2nfIJc/QB8iL9J2Mm8bx2GOnbtKoUeKVvirx7/d5ZtzOaN9+v6e/niwWC/ZMfHy5ZZnxdnhgz8XHze/VOj12vhAfdPXv43a7ely+Fi/fNux2vUl/3myydJ1u339/KhrfCHwQOKwg/vjcsN/vZ4Ggd9oIeqcNl96CyruM8mJQDgWn1T4xZ+V19JYsBnf3ZfXKtWkxHr3StorT5TDk2l30Kj+uETNelozH9TOj0uYlZ7E+Vtcg7VaDMjS+WrsZB/3ImAv7AJeyoM2YmJVODZDXWXq1/U1O0Cctfd56beuC/kZvbOEk+sEZ+Oi1+lyj1x1jcE4T/5WeU/6s68VzlR9VcxAXPf7V3WO/d87SC/kjm6s5bTHqqxf6p9aGuMjzcPmWbqOuevUxug2aM6ZFZ71qrsO+Tr14L8ijq179O8uIFZvt6z21+6FX/Nr12nhBX+nsz5CX0OKOeeOMYXvf+9lHr+Fj4ffktBH0Thtz1TsnLA9FSvKYpar6SR/uUvZSPHy6v7vfLv+sfqTLQ1mTfibGoFfi4VD53N6lq7+3m3XV83X7kPYsnr5bjK94OhbnDDwCj8DjCFxgug6PtqQS8fAoeuCCi5HA1O8qAaecWgsUPjwcxQhHMnTkCRN5mFTgQpI3j1NFAjOpkesaRRNb8ehsu1Rtp5O7hXU8PMMBeVgSes0nBj6PtiKLZsMCF6RwIt6Dx97OhRbAHihe6rVQgnyd+6MNgUfg4cNjDBgomQj/l3EZ7Ha7WSDonTaC3mnDpTcj8i4jPBuUQ8ZJtU/Ek/w6evMkAnf3ZfXKtUk2Hr3StorT5TDk2l30Kj+uESU8zxMe1c8JkTbPeRLpY3UN0m41SILGV2s346AfGXNhH+CSZ6QZEyW5UwPkdZZebX+TE/RJS5+3Xtu6oL/RG1k4iX5wBj56rT7X6HXHGJzTxH+l55Q/63rxXOVH1RzERY9/dffY752z9EL+yOZqTluM+uqF/qm1IS7yPFy+pduoq159jG6D5oxJ1lmvmuuwr1Mv3gvy6KpX/84yYsVm+3pP7X7oFb92vTZe0Fc6+zPkJbS4Y944Y9je93720Wv4WPg9OW0EvdPGXPXOCeH/MjwxFucMPAKPwOMIXGC6Do+2pBLx8Ch64IKLkcDU7yoBJ5xYCxQ+PBzFCEcydOQJE3mYVOBCkjePU0UCM6mR6xpFE1vx6Gy7VG2nk7uFdTw8wwF5WBJ6zScGPo+2IotmwwwXpHAi3oPHzs6FZMAeKF7qtVCCfJ37ow2BR+Dhw2MMGCaZ+A/deCl0"]


      the following buttons appears without scaling in a list:



      buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}] &, images]


      However when putting them in a Multicolumn, they scale badly to match sizes.



      Multicolumn[buttons, 1]




      I want them to align center left with the same size as they appear in the List.

      Neither Magnification -> 1 in the images nor Grid with Alignment -> Left fixed it.

      How to make a grid of such buttons without scaling images?



      All images have the same vertical size if that matters.







      image button






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 at 22:41









      MeMyselfI

      46419




      46419






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}, 
          ImageSize -> All] &, images]


          enter image description here



          Multicolumn[buttons, 1]


          enter image description here






          share|improve this answer





















            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "387"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186605%2fhow-to-pixel-constrain-button-appearance-given-as-images%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}, 
            ImageSize -> All] &, images]


            enter image description here



            Multicolumn[buttons, 1]


            enter image description here






            share|improve this answer

























              up vote
              5
              down vote



              accepted










              buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}, 
              ImageSize -> All] &, images]


              enter image description here



              Multicolumn[buttons, 1]


              enter image description here






              share|improve this answer























                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}, 
                ImageSize -> All] &, images]


                enter image description here



                Multicolumn[buttons, 1]


                enter image description here






                share|improve this answer












                buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2}, 
                ImageSize -> All] &, images]


                enter image description here



                Multicolumn[buttons, 1]


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 23 at 22:52









                kglr

                175k9197402




                175k9197402






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematica Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186605%2fhow-to-pixel-constrain-button-appearance-given-as-images%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen