ScriptUI-Dialog-Builder-Joonas
ScriptUI-Dialog-Builder-Joonas copied to clipboard
Images in list items or iconbuttons
It would be great if you could implement functionality with images as list items or edit properties of iconbuttons. The voodoo of images in Script UI is difficult to sort out! Even using sprites as buttons is difficult to find good reference on.
...or edit properties of iconbuttons.
What do you mean? There are customizable properties for iconbuttons in SDB as far as I'm aware. Are there some specific properties missing in SDB that you'd like to see added?
Sorry for the delayed response. I enjoy using your tool and in general its made things a lot easier. My trouble has been adding images and using a scrollbar which was my ultimate goal. I can send you example if you want of what I was finally able to implement using your tool as a base then modifying it.
I tried list with image inside items which was difficult since they do not refresh and labels are difficult to control placement on. I thine moved onto images and a scrollbar.
When I was referring to editing properties of icon buttons I meant shape and look as well as control of the text label (below or to the left) so that they could be inside a table/list and autoscroll.
Aside from being able to add scrollbar using your tool, it would be very cool to setup on click/on change dummy functions that can be simple example that returns response that someone could learn from and use with more complicated editing.
I hope this makes sense!
There used to be a checkbox in the properties panel that controlled the overall look, but when I added creation properties, I semi consciously made it more obscure and now iconButton
properties panel has a creation property style
, which controls that.
Acceptable values (This info is in the creation property's title attribute too):
-
button
: Has a visible border with a raised or 3D appearance. -
toolbutton
: Has a flat appearance, appropriate for inclusion in a toolbar
Yes, it was very much a conscious decision to leave out titleLayout
options for IconButton
because my perception was that the item itself is not super widely used anyways. I can put that stuff under consideration...
Same goes for the scrollbar. Gonna put that in the maybe pile.
I'm not exactly sure what you mean by dummy functions though?
dummy functions.........when a pull down is added have the on change code and function included so that when the UI is used it points at a "dummy function" like display the result. This way it would be easy for someone to alter the code to if result is whatever do whatever....hope your able to follow that.
There used to be a checkbox in the properties panel that controlled the overall look, but when I added creation properties, I semi consciously made it more obscure and now
iconButton
properties panel has a creation propertystyle
, which controls that.
Acceptable values (This info is in the creation property's title attribute too):
button
: Has a visible border with a raised or 3D appearance.toolbutton
: Has a flat appearance, appropriate for inclusion in a toolbarYes, it was very much a conscious decision to leave out
titleLayout
options forIconButton
because my perception was that the item itself is not super widely used anyways. I can put that stuff under consideration...Same goes for the scrollbar. Gonna put that in the maybe pile.
I'm not exactly sure what you mean by dummy functions though?
I didn't have much success changing the style and having it update in the view but assumed it would be correct if implemented. Not sure why the text for an icon button always has to appear to the left. Wish it could be after or below by inserting returns or aligning items inside icon button. I don't think that a limitation in your code. my guess its in the UI limits.
So something like this, I guess?
The iconbutton button
and toolbutton
styles do seem to work as far as my tests go, but their difference is very subtle:
-
style:
button
-
style:
toolbutton
There is a possibility they look identical or more similar in in various applications and/or their different versions.
Yea, you can actually totally change the text position and it is very much a limitation of SDB and not ScriptUI. You can get around it and most things by adding your own custom code, using titleLayout
. Here's an example:
See the line before
dialog.show();
/*
Code for Import https://scriptui.joonas.me — (Triple click to select):
{"activeId":1,"items":{"item-0":{"id":0,"type":"Dialog","parentId":false,"style":{"enabled":true,"varName":null,"windowType":"Dialog","creationProps":{"su1PanelCoordinates":false,"maximizeButton":false,"minimizeButton":false,"independent":false,"closeButton":true,"borderless":false,"resizeable":false},"text":"Dialog","preferredSize":[0,0],"margins":16,"orientation":"column","spacing":10,"alignChildren":["center","top"]}},"item-1":{"id":1,"type":"IconButton","parentId":0,"style":{"enabled":true,"varName":null,"text":"IconButton","preferredSize":[0,0],"creationProps":{"style":"button","toggle":false},"iconButtonStroke":false,"image":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYge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X8Bv6kM6Nd7kGXifSCRkbnZWYrHYoJSlVqvJu3xeyuUytwz4iTdTWs90Vhnk1dLSjUEo1NGGtvTRvqJ0YaeZDm8SDod7X64jHSNcn+OMQhva0kfX01G6OzOsibkJg7zO5SS3siLVatWH6xzOTDDa0kc3ZcTWLU6ysEaUUmJZljSbTXmztuafcR2NRsVSqmdHn929PXZ2VJk5Md2huFi/XFz0HRGgRLjmmRuwC/gMKbklUXpi/TkJFpYp6XTuE5NmsAEBnwulx/4Iw9Yz6Ha70ul0xKRj0uRZBzoj2ofTfmiNZzJ/WJZKpZJ9lMlIJBLxSafT8mRqSuLxuDiOI+PYT2azEg909sPGBj+ax/az0g9wC2N/xolttVq99rp9DTBBaENb+uh3d8UbUeeB00aj8bxYLEoqlfJvddMTebu+bp7IAtgF1ybQNTgBPxHscaFQiF56iB0KyV/UhIU+LpVkZ3vbT8fzvDMdhI/2Mvhob/U3IlpRAN/A5v/82P4JMAC5N/hnHN2zDwAAAABJRU5ErkJggg=="],"alignment":null,"helpTip":null}}},"order":[0,1],"settings":{"importJSON":true,"indentSize":false,"cepExport":false,"includeCSSJS":true,"showDialog":true,"functionWrapper":false,"itemReferenceList":"None"}}
*/
// DIALOG
// ======
var dialog = new Window("dialog");
dialog.text = "Dialog";
dialog.orientation = "column";
dialog.alignChildren = ["center","top"];
dialog.spacing = 10;
dialog.margins = 16;
var iconbutton1_imgString = "%C2%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%12%00%00%00%12%08%06%00%00%00V%C3%8E%C2%8EW%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C3%89e%3C%00%00%03(iTXtXML%3Acom.adobe.xmp%00%00%00%00%00%3C%3Fxpacket%20begin%3D%22%C3%AF%C2%BB%C2%BF%22%20id%3D%22W5M0MpCehiHzreSzNTczkc9d%22%3F%3E%20%3Cx%3Axmpmeta%20xmlns%3Ax%3D%22adobe%3Ans%3Ameta%2F%22%20x%3Axmptk%3D%22Adobe%20XMP%20Core%205.6-c145%2079.163499%2C%202018%2F08%2F13-16%3A40%3A22%20%20%20%20%20%20%20%20%22%3E%20%3Crdf%3ARDF%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%3E%20%3Crdf%3ADescription%20rdf%3Aabout%3D%22%22%20xmlns%3Axmp%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2F%22%20xmlns%3AxmpMM%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2Fmm%2F%22%20xmlns%3AstRef%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2FsType%2FResourceRef%23%22%20xmp%3ACreatorTool%3D%22Adobe%20Photoshop%20CC%202019%20(Macintosh)%22%20xmpMM%3AInstanceID%3D%22xmp.iid%3A600D85EF3FAA11E99731F012F5360853%22%20xmpMM%3ADocumentID%3D%22xmp.did%3A600D85F03FAA11E99731F012F5360853%22%3E%20%3CxmpMM%3ADerivedFrom%20stRef%3AinstanceID%3D%22xmp.iid%3A600D85ED3FAA11E99731F012F5360853%22%20stRef%3AdocumentID%3D%22xmp.did%3A600D85EE3FAA11E99731F012F5360853%22%2F%3E%20%3C%2Frdf%3ADescription%3E%20%3C%2Frdf%3ARDF%3E%20%3C%2Fx%3Axmpmeta%3E%20%3C%3Fxpacket%20end%3D%22r%22%3F%3E%12ywY%00%00%020IDATx%C3%9A%C2%AC%C2%94%3DK%5BQ%18%C3%87%C2%9F%C2%9C%7B%C3%89%C2%92%C3%9CB%C3%A56q%09T%C3%A2%C2%90%C2%A5%16b%3ATc%C2%BF%C2%80%14Zp%C3%AF%C2%A4%0En%16%C3%AB7ht%C2%A8C%C3%9D%C2%9A%C2%A9T%C2%9C%3A%C2%94%167%1D4%C3%94%C2%B9%C2%B5%C2%A1%C2%93b0%26h%1A%C3%AC5%C2%86%C2%82!I%C3%BB%C3%BF_%C3%8E%09%C2%97%10%C2%87%C2%82%0F%C3%BC%C3%A0%C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%13%C2%93f%C2%B0%01%01%C2%9F%0B%C2%A5%C3%87%C3%BE%08%C3%83%C3%963%C3%A8v%C2%BB%C3%92%C3%A9t%C3%84%C2%A4c%C3%92%C3%A4Y%07%3A%23%C3%9A%C2%87%C3%93~h%C2%8Dg2%7FX%C2%96J%C2%A5%C2%92%7D%C2%94%C3%89H%24%12%C3%B1I%C2%A7%C3%93%C3%B2djJ%C3%A2%C3%B1%C2%B88%C2%8E%23%C3%A3%C3%98Of%C2%B3%12%0Ft%C3%B6%C3%83%C3%86%06%3F%C2%9A%C3%87%C3%B6%C2%B3%C3%92%0Fp%0Bc%7F%C3%86%C2%89m%C2%B5Z%C2%BD%C3%B6%C2%BA%7D%0D0AhC%5B%C3%BA%C3%A8ww%C3%85%1BQ%C3%A7%C2%81%C3%93F%C2%A3%C3%B1%C2%BCX%2CJ*%C2%95%C3%B2ou%C3%93%13y%C2%BB%C2%BEn%C2%9E%C3%88%02%C3%98%05%C3%97%26%C3%9058%01%3F%11%C3%ACq%C2%A1P%C2%88%5Ez%C2%88%1D%0A%C3%89_%C3%94%C2%84%C2%85%3E.%C2%95dg%7B%C3%9BO%C3%87%C3%B3%C2%BC3%1D%C2%84%C2%8F%C3%B62%C3%B8ho%C3%B57%22ZQ%00%C3%9F%C3%80%C3%A6%C3%BF%C3%BC%C3%98%C3%BE%090%00%C2%B97%C3%B8g%1C%C3%9D%C2%B3%0F%00%00%00%00IEND%C2%AEB%60%C2%82";
var iconbutton1 = dialog.add("iconbutton", undefined, File.decode(iconbutton1_imgString), {name: "iconbutton1", style: "button"});
iconbutton1.text = "IconButton";
iconbutton1.titleLayout = { alignment: ['center', 'bottom'] };
dialog.show();
More on titleLayout
in the Javascript Tools Guide.pdf. The link should open up in the correct page. If not, it's under the title: Title Alignment and orientation
in page 99.
Yes but thats too complicated. Im thinking an on click would be created for each pull down, on change for text added etc….then there could be a default function attached that logged the change or displayed the result. They wouldn’t have to be interlinked (one pulldown effecting another etc) they could be independent but simply if someone wanted to make a pallet with a pulldown or checkbox it would be prepped and easy to convert. You could have an overall setting that if was checked did this as default….something like include on events in code. Hope that makes sense.
On Mar 2, 2020, at 2:07 PM, Joonas Pääkkö [email protected] wrote:
So something like this https://github.com/joonaspaakko/ScriptUI-Dialog-Builder-Joonas/issues/32, I guess?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joonaspaakko/ScriptUI-Dialog-Builder-Joonas/issues/71?email_source=notifications&email_token=AAMXAKZ5KPVFSIXQN5CLFS3RFP7VJA5CNFSM4KQ6UVAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQRORA#issuecomment-593565508, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXAKZ7VTJTZIRHKG65LM3RFP7VJANCNFSM4KQ6UVAA.
I'm not entirely confident I understood it a 100%, but either way I am very hesitant to add anything to do with events because it takes very little effort to write them, say: myButton1.onClick = function() { alert('...or whatever') }
. I feel that anything that I would add regarding events would be either too little or too much.
While I can acknowledge that these things could be slight convenience boosters, I kinda don't want to focus on that stuff, because I feel like once the layout of the dialog is built, that is where you as the user step in with your custom code, because I don't know what that custom code should look like. I don't even want to guess what it would look like. It's best if the user themselves figures it out. I think...
I updated my previous comment with details on iconButton
styling after you commented on it.
I understand and agree. As someone who writes automation, understand the limited time savings and potential support needed. Thank you for responding. if I can be of any assistance in the iconbuttons or scroll bar feedback should you decide to add more features, please let me know.
Sent from my iPhone
On Mar 2, 2020, at 2:34 PM, Joonas Pääkkö [email protected] wrote:
I'm not entirely confident I understood it 100%, but either way I am very hesitant to add anything to do with events because it takes very little effort to write them, say: myButton1.onClick = function() { alert('...or whatever') }. I feel that anything that I would add regarding events would be either too little or too much.
While I can acknowledge that these things could be slight convenience boosters, I kinda don't want to focus on that stuff, because I feel like once the layout of the dialog is built, that is where you as the user step in with your custom code, because I don't know what that custom code should look like. I don't even want to guess what it would look like. It's best if the user themselves figures it out. I think...
I updated my previous comment with details on iconButton styling after you commented on it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
So something like this, I guess?
The iconbutton
button
andtoolbutton
styles do seem to work as far as my tests go, but their difference is very subtle:
- style:
button
![]()
- style:
toolbutton
![]()
There is a possibility they look identical or more similar in in various applications and/or their different versions.
Yea, you can actually totally change the text position and it is very much a limitation of SDB and not ScriptUI. You can get around it and most things by adding your own custom code, using
titleLayout
. Here's an example:See the line before
dialog.show();
/* Code for Import https://scriptui.joonas.me — (Triple click to select): {"activeId":1,"items":{"item-0":{"id":0,"type":"Dialog","parentId":false,"style":{"enabled":true,"varName":null,"windowType":"Dialog","creationProps":{"su1PanelCoordinates":false,"maximizeButton":false,"minimizeButton":false,"independent":false,"closeButton":true,"borderless":false,"resizeable":false},"text":"Dialog","preferredSize":[0,0],"margins":16,"orientation":"column","spacing":10,"alignChildren":["center","top"]}},"item-1":{"id":1,"type":"IconButton","parentId":0,"style":{"enabled":true,"varName":null,"text":"IconButton","preferredSize":[0,0],"creationProps":{"style":"button","toggle":false},"iconButtonStroke":false,"image":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9Ii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01G6OzOsibkJg7zO5SS3siLVatWH6xzOTDDa0kc3ZcTWLU6ysEaUUmJZljSbTXmztuafcR2NRsVSqmdHn929PXZ2VJk5Md2huFi/XFz0HRGgRLjmmRuwC/gMKbklUXpi/TkJFpYp6XTuE5NmsAEBnwulx/4Iw9Yz6Ha70ul0xKRj0uRZBzoj2ofTfmiNZzJ/WJZKpZJ9lMlIJBLxSafT8mRqSuLxuDiOI+PYT2azEg909sPGBj+ax/az0g9wC2N/xolttVq99rp9DTBBaENb+uh3d8UbUeeB00aj8bxYLEoqlfJvddMTebu+bp7IAtgF1ybQNTgBPxHscaFQiF56iB0KyV/UhIU+LpVkZ3vbT8fzvDMdhI/2Mvhob/U3IlpRAN/A5v/82P4JMAC5N/hnHN2zDwAAAABJRU5ErkJggg=="],"alignment":null,"helpTip":null}}},"order":[0,1],"settings":{"importJSON":true,"indentSize":false,"cepExport":false,"includeCSSJS":true,"showDialog":true,"functionWrapper":false,"itemReferenceList":"None"}} */ // DIALOG // ====== var dialog = new Window("dialog"); dialog.text = "Dialog"; dialog.orientation = "column"; dialog.alignChildren = ["center","top"]; dialog.spacing = 10; dialog.margins = 16; var iconbutton1_imgString = "%C2%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%12%00%00%00%12%08%06%00%00%00V%C3%8E%C2%8EW%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C3%89e%3C%00%00%03(iTXtXML%3Acom.adobe.xmp%00%00%00%00%00%3C%3Fxpacket%20begin%3D%22%C3%AF%C2%BB%C2%BF%22%20id%3D%22W5M0MpCehiHzreSzNTczkc9d%22%3F%3E%20%3Cx%3Axmpmeta%20xmlns%3Ax%3D%22adobe%3Ans%3Ameta%2F%22%20x%3Axmptk%3D%22Adobe%20XMP%20Core%205.6-c145%2079.163499%2C%202018%2F08%2F13-16%3A40%3A22%20%20%20%20%20%20%20%20%22%3E%20%3Crdf%3ARDF%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%3E%20%3Crdf%3ADescription%20rdf%3Aabout%3D%22%22%20xmlns%3Axmp%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2F%22%20xmlns%3AxmpMM%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2Fmm%2F%22%20xmlns%3AstRef%3D%22http%3A%2F%2Fns.adobe.com%2Fxap%2F1.0%2FsType%2FResourceRef%23%22%20xmp%3ACreatorTool%3D%22Adobe%20Photoshop%20CC%202019%20(Macintosh)%22%20xmpMM%3AInstanceID%3D%22xmp.iid%3A600D85EF3FAA11E99731F012F5360853%22%20xmpMM%3ADocumentID%3D%22xmp.did%3A600D85F03FAA11E99731F012F5360853%22%3E%20%3CxmpMM%3ADerivedFrom%20stRef%3AinstanceID%3D%22xmp.iid%3A600D85ED3FAA11E99731F012F5360853%22%20stRef%3AdocumentID%3D%22xmp.did%3A600D85EE3FAA11E99731F012F5360853%22%2F%3E%20%3C%2Frdf%3ADescription%3E%20%3C%2Frdf%3ARDF%3E%20%3C%2Fx%3Axmpmeta%3E%20%3C%3Fxpacket%20end%3D%22r%22%3F%3E%12ywY%00%00%020IDATx%C3%9A%C2%AC%C2%94%3DK%5BQ%18%C3%87%C2%9F%C2%9C%7B%C3%89%C2%92%C3%9CB%C3%A56q%09T%C3%A2%C2%90%C2%A5%16b%3ATc%C2%BF%C2%80%14Zp%C3%AF%C2%A4%0En%16%C3%AB7ht%C2%A8C%C3%9D%C2%9A%C2%A9T%C2%9C%3A%C2%94%167%1D4%C3%94%C2%B9%C2%B5%C2%A1%C2%93b0%26h%1A%C3%AC5%C2%86%C2%82!I%C3%BB%C3%BF_%C3%8E%09%C2%97%10%C2%87%C2%82%0F%C3%BC%C3%A0%C2%9C%C3%B3%C2%BC%C3%9C%C3%B3%C2%BC%C2%9C%1B%C2%9A%C2%9B%C2%9F%C2%97%01%C3%A2%C2%80%110%0A%C2%86%C3%B4%C3%99%058%04%C3%87%C3%A0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3%9A%C2%87%C3%93~h%C2%8Dg2%7FX%C2%96J%C2%A5%C2%92%7D%C2%94%C3%89H%24%12%C3%B1I%C2%A7%C3%93%C3%B2djJ%C3%A2%C3%B1%C2%B88%C2%8E%23%C3%A3%C3%98Of%C2%B3%12%0Ft%C3%B6%C3%83%C3%86%06%3F%C2%9A%C3%87%C3%B6%C2%B3%C3%92%0Fp%0Bc%7F%C3%86%C2%89m%C2%B5Z%C2%BD%C3%B6%C2%BA%7D%0D0AhC%5B%C3%BA%C3%A8ww%C3%85%1BQ%C3%A7%C2%81%C3%93F%C2%A3%C3%B1%C2%BCX%2CJ*%C2%95%C3%B2ou%C3%93%13y%C2%BB%C2%BEn%C2%9E%C3%88%02%C3%98%05%C3%97%26%C3%9058%01%3F%11%C3%ACq%C2%A1P%C2%88%5Ez%C2%88%1D%0A%C3%89_%C3%94%C2%84%C2%85%3E.%C2%95dg%7B%C3%9BO%C3%87%C3%B3%C2%BC3%1D%C2%84%C2%8F%C3%B62%C3%B8ho%C3%B57%22ZQ%00%C3%9F%C3%80%C3%A6%C3%BF%C3%BC%C3%98%C3%BE%090%00%C2%B97%C3%B8g%1C%C3%9D%C2%B3%0F%00%00%00%00IEND%C2%AEB%60%C2%82"; var iconbutton1 = dialog.add("iconbutton", undefined, File.decode(iconbutton1_imgString), {name: "iconbutton1", style: "button"}); iconbutton1.text = "IconButton"; iconbutton1.titleLayout = { alignment: ['center', 'bottom'] }; dialog.show();
More on
titleLayout
in the Javascript Tools Guide.pdf. The link should open up in the correct page. If not, it's under the title:Title Alignment and orientation
in page 99.
This is awesome feedback thanks!