How to pixel constrain Button Appearance given as images?
up vote
4
down vote
favorite
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
add a comment |
up vote
4
down vote
favorite
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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9/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
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
image button
asked Nov 23 at 22:41
MeMyselfI
46419
46419
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2},
ImageSize -> All] &, images]
Multicolumn[buttons, 1]
add a comment |
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]
Multicolumn[buttons, 1]
add a comment |
up vote
5
down vote
accepted
buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2},
ImageSize -> All] &, images]
Multicolumn[buttons, 1]
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2},
ImageSize -> All] &, images]
Multicolumn[buttons, 1]
buttons = MapThread[Button["", Appearance -> {"Default" -> #, "Pressed" -> #2},
ImageSize -> All] &, images]
Multicolumn[buttons, 1]
answered Nov 23 at 22:52
kglr
173k8196401
173k8196401
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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