IconButton - display of State borders 'hurry '.

Hello

is there a way to indicate a property of an iconbutton (in a ScriptUI window) as a "pressed" status does not show the border of the button and the cloak?

var dir = "" + File($.fileName).path + "/img/";
var icons =  {          normal: File(dir + "createNew_normal.png"),
                              disable: File(dir + "createNew_normal.png"), 
                              pressed: File(dir + "createNew_pressed.png"), 
                            rollover: File(dir + "createNew_rollover.png")
                         };
var w = new Window("dialog");
b = w.add ("iconbutton", undefined, ScriptUI.newImage (icons.normal, icons.disable, icons.pressed, icons.rollover), {style: "toolbutton"});
w.show();

With the {style: "toolbutton"} I can avoid the borders button on the normal state and turning, yet it shows (tested on PS CC and ESTK, OSX) press.

Thank you!

Davide Barranca

www.davidebarranca.com

Hi Xavier,.

I studied circumvention of Marc for awhile yesterday, but as it is it does not work on Photoshop. For some reason any element 'image' itself, given the call explicitly OnDraw () and the prototype of refreshment, it is written, is not crop the image sprite, so what you see is the complete Tri-State moving up and down. Impeccable on InDesign and ESTK, flawed on PS.

I was able to tweak it and get a Sprite work using a component "customView" instead of 'image'-, but it took a long time puzzle

Apparently, the custom components (while a bit more boring because they have no default appearance either) have a more standard behavior.

For my problem, I found that you explicitly set the event listeners and the OnDraw () method (as you would for a customButton), finally, it works as expected:

var dir = "" + File($.fileName).path + "/img/";
var icons =  { normal: File(dir + "createNew_normal.png"),
               disable: File(dir + "createNew_normal.png"),
               pressed: File(dir + "createNew_pressed.png"),
               rollover: File(dir + "createNew_rollover.png")
};

var w = new Window("dialog");
b = w.add ('button'); // works for customButton, iconButton, button
b.preferredSize = [200,100];

var roll = ScriptUI.newImage(icons.rollover);
var norm = ScriptUI.newImage(icons.normal);
var down = ScriptUI.newImage(icons.pressed);

b.image = norm;
b.size = [140, 40]
b.onDraw = function (state) {
    this.graphics.drawImage(this.image,0,0);
}

var mouseEventHandler = function(event) {
    switch (event.type) {
        case 'mouseover':
            event.target.image = roll;
            break;
        case 'mouseout':
            event.target.image = norm;
            break;
        case 'mousedown':
            event.target.image = down;
            break;
        case 'mouseup':
            event.target.image = roll;
            break;
        default:
            event.target.image = norm;
    }
    event.target.notify("onDraw");
}

b.addEventListener('mouseover', mouseEventHandler, false);
b.addEventListener('mouseout', mouseEventHandler, false);
b.addEventListener('mousedown', mouseEventHandler, false);
b.addEventListener('mouseup', mouseEventHandler, false);

w.show();

Davide

Tags: Photoshop

Similar Questions

  • Where can I find all my States system restore? When I try to restore windows only displays the States from today until 7 days ago

    Where can I find all my States system restore? When I try to restore windows only displays the States from today until seven days ago.

    I'm trying to find the States of up to a year ago.

    Hello

    system restore points are not here forever

    It depends on the amount of space reserved for restoring the system restore points on how you

    and as a new one is created the oldest one is deleted

    http://www.windowsvistauserguide.com/system_restore.htm

    There is a box to check points over 5 days which must obviously have checked back 7 days?

    or 7 days a rough estimate on your part?

    and here's how to change the amount of space for the restoration of the system increase or decrease to restore more or less points in the future

    http://www.Vistax64.com/tutorials/76227-system-restore-disk-space.html

    http://www.vista4beginners.com/system-restore-space-used

  • Unable to display the State of the material.

    Hi all

    Using esxi 4.1 with vcenter 5.0, but when I click on each host and go to the State of the material I couldn't see anything. the message I get there

    "No new available given host. Data will be updated in 5 minutes"

    even after 5 minutes, nothing happens, I refreshed this page, clicked on update nothing happens.

    After searching on Google, I came to the link below. What status you must have the permissions. But here, I have the full privileges, am the vcenter administrator and host.

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1035457

    http://KB.VMware.com/selfservice/microsites/search.do?cmd=displayKC & docType = kc & externalId = 1030536 & sliceId = 1 & docTypeID = DT_KB_1_1 & dialogID = 268874248 & StateID = 0% 200% 20254100776

    One fell on it, please help in this regard, I need to monitor and check the hardware of the server also know if any material questions.

    Concerning

    Riadh Gunnal

    Guys, I found the solution. At least it works for me. I don't remember the website, but it was half correct, it lacked a single step.

    1 stop the vCenter inventory service

    2 - remove all the contents of C:\Program Files\VMware\Infrastructure\Inventory Service\data

    3 - go to C:\Program Files\VMware\Infrastructure\Inventory Service\scripts\ and run createDB.bat

    4 - run register.bat with your server name. FQDN Register.bat 443

    5 start the vCenter inventory service.

    And that's all!

    My environment: VCenter 5 update vCenter 4.1. Same host, same name.

  • When I try to download the demo version of Age of Mythology, I'm headed to open or save the file. I click Open and the screen that displays the States "this page is not available." How can I download the trial version?

    problems to download the demo version of Age of Mythology

    Hello lesadawne, welcome.

    Here would be a possible download location:
    It is referenced in the link of the thread above, however, if this link is no longer available, you can use it.
    Thank you!

    Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • PIX command to display the State of tunnel upwards or downwards

    I would like to ask if there is a specific order in the PIX OS, that will allow me to show if the tunnels I implemented for VPN from a distance PIX to local are active...

    I looked through the show? on the Pix but cannot determine...

    You would think that there is a command 'see the tunnel... "

    Hello

    You can use:

    "Show isakmp crypto her" to see whether or not your tunnel is mounted and,.

    "A show crypto ipsec her" to see if the packets are encrypted/decrypted or not.

    Kind regards

    Arul

  • I can open is no longer online statements

    I can open is no longer online statements that I could open before. For example my insurance statements. Not password protected. The window opens to display the statement and about 1/15 of the declaration can be seen in the upper part of the window and the bar to adjust the display and go down the page works, but there is nothing to do.

    Also, I wonder if it has to do with my lack of Adobe Reader?

    When it opened that wants to show on the menu bar?

    Does show preview as below or another program?

    You can also download Adobe Reader here. https://get.Adobe.com/reader/

    It's free.

    Kim

  • Is this a bad display or the inverter? Or could it be something else?

    Pavilion dv4-1225dx Entertainment Notebook PC

    It is a LED display? State record: 14,1 "Diagonal WXGA high-definition HP BrightView Widescreen Display (1280 x 800)

     

    Original forum post with the video of the screen of the problem:

    http://h30434.www3.HP.com/T5/notebook-display-and-video/flickering-display-at-startup-but-stops-jump...

    15 f009wm 8.1 WIN 64 bit
    Office Jet 2540
    P2-1113w WIN 7 64 bit
    G71-340US WIN 7 64 bit
    dv4-1225dx VIsta 64-bit
    zd7000 WIN XP Pro
    xv886 Millennium WIN / WIN XP Pro
    HP deskjet 6980xi
    HP pavilion xt236 / ze4200 WIN XP Media Edition

    SOLVED

    First tried the best route, new inverter $4.89, but the problem persisted.

    Replace the LCD ($65,75) and the problem is solved.

  • Table cell borders appears in Chrome

    For all my subjects, the borders around individual cells in all tables not displayed when I viewed using Chrome. In addition, everything else works fine with Chrome and display the cell borders as it should in IE and Firefox (Firefox has however some independent display other problems). I use a table style to format all of the tables, but the style has no cell borders because I could never make it work like I wanted. I use the style for all tables and then manually add the cell borders. Could be that something to do with it, there may be a known issue that I couldn't find anywhere?


    RoboHelp10 / WebHelp Pro SSL / release of SharePoint hosted in 10 files


    Chrome (forgive my content)

    Robo_Table_Cell_Chrome.png

    IE/Firefox (again with the content)

    Robo_Table_Cell_IE.png

    Yah, so I was affecting the cell borders inner .5pt on all my paintings. Changed to 1px instead, and they now appear in Chrome very well. I'll mark my answer as the correct answer and advise The captain Obvious. Apparently, it seems that any rule defined below .8pt in will not display in Chrome. Not sure if that is a thing of RoboHelp or a Chrome thing?

    Best regards.

  • Disables the Menu button on the subsites State

    Hello!

    I created a Web site complex with a menu where active status is blue, and otherwise, it is gray. Now: it works if I'm on the top level of the respective menu section site, finde. but I have a number of sites of lower level under the same menu button, that are linked by means of a distribution (with its own menu) site.

    Bildschirmfoto 2014-08-27 um 15.24.33 1.png


    When I click on the distributive menu buttons, my menu up status 'normal' again, as follows:


    Bildschirmfoto 2014-08-27 um 15.24.45.png


    Now, I'm still under the same top level menu button, but it is not looked at via the Menu status.

    How can I say Muse to keep the menu on active status, while watching a those sites of lower level?


    Thanks a bunch!


    Tim





    Hi Tim,.

    Sorry for the late reply.

    A Menu button displays active state only when the page that is attached to this special Menu button is activated.

    Now, when you select any page from the child, the child page become active and thatsy in the submenu, the child from the page Menu button show active. But meanwhile, the top-level including your current page page is a child is not active and thatsy the main Menu of the top-level page button does not show active state.

    So from now Muse only offers not anywhere what device to achieve the desired effect.

    Kind regards

    Rohit Nair

  • view the output of dbms_output statement in Toad

    Hi expert,

    I use dbms_output instruction in proceudre and run it into a toad, but he must run ' set serveroutput we "display output statement dbms_output.

    But how can I achieve this functionality in Toad.

    Thank you very much

    >

    Hello

    I use dbms_output instruction in proceudre and run into a frog, but it
    should run "set serveroutput on" to display the output of statement dbms_output.
    But how can I achieve this functionality in Toad.

    At the bottom of your window, there are number of tabs. One of them is
    DBMS_Output. There is a small red button on the left side. Click on this button.
    It turns green. Then, your output is visible - you can click on it and scroll
    upward through your results.

    In the future, ask questions of Toad in a forum of Toad.

    HTH,

    Paul...

  • Display of the password

    I put the password by the Guide to registration on some hosts ESX 3.5 U4 earlier, but don't remember when.

    Is there a way to display the State of the setting or the age of the password for example. How many days left before that forces me to change?

    Thank you

    esxcfg-auth -p
    

    you empty your auth configuration which allows to display what you have set the aging to be.

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    150 VMware developer

    Twitter: @lamw

    If you find this information useful, please give points to "correct" or "useful".

  • Calculation and display of difference between the two amounts

    Hi all

    I have the report in which I am posting two SUM fields at levels of summaries.

    <? xdoxslt:sum (LINE_QTY)? >
    and
    <? xdoxslt:sum (INV_DIST_AMT)? >

    I want to display another field bordering these fields that will be the difference between these two.

    Can you please tell me the function to achieve.

    Thank you
    Anish.

    Have you tried this:

    If you want to continue using the scope function, then use

  • How to create a horizontal line in the region of html

    Hello

    How can I create the html elements, including a horizontal line in an html area filled with items. I want to use this horizontal line to part elements optically. Moreover, my solution for now is to group the elements belonging together in a separate html area. So I have now 3 parts of html, each filled with 5 columns of elements. Is it possible to align the elements in the 3 regions (together)? Cause at the present time, only the items in each region are aligned.

    I use oracle 11 g 2 with apex 4.1

    wucis wrote:

    Apex version is 4.1

    Theme: Sapphire 17

    Page: Two level Tabs - right Sidebar (optional / based on a table)

    The region is HTML

    Main question is, how to create a horizontal line as visible separator between items.

    My personal preference would be to group the items according to the needs in the subregions and use CSS to display the Visual borders and uniform spacing of control over formatting tables.

    If however you want using HTML single region, is to create elements of the only view to the agenda of the positions of the sequence in the region where you want the jumps to appear, with the following parameters:

    Name: PX_HR_1 / / substitute suffix number and an increment of page as required

    Display in the form: Display only

    Save Session State: NO.

    Start on a new line: Yes

    Start the new field: Yes

    ColSpan: number of columns in your layout

    Label: leave blank

    Horizontal/Vertical alignment: Above

    Model: --choose a model--

    Type of source: Static assignment

    Source of value or expression:

  • AppleScript

    I have the following problem with the script editor.  I have a script that goes through a spreadsheet Numbers cell-by-cell and examines the background color for each cell.  If the background color is yellow it it turns green.  I couldn't get this script to work therefore inserted a Display Dialog statement in the loop to show what background color has been found.  After seeing the color of a few cells, I hit the button cancel from the dialog box display.  After that I can not open the script editor - it starts but then displays the spinning beachball and it's there.  Force quit the script editor does not solve the problem nor did restart my Mac.  I noticed that there was an update waiting for OS X El Capitan, I have so installed.  Strangely, after the script editor open, and I was able to run the script, but after cancelling the dialog box display I'm stuck now even once - script editor crashes on opening - I still think trying to open my script.  How can I get around this?

    I am running OS X El Capitan, version 10.11.6 MacBook Pro (retina, 13 inches, end 2013) 8 GB of memory

    Not sure if it's the same problem I had, but.

    Script editor cannot open my corrupted script starts. Found that used cache of documents starting recently open in system preferences. After the alias of the file, it found the same corrupted file to try to open every time I moved or renamed!

    My solution was to duplicate the file and remove the problem file.

    HTH

  • script editor

    I have the following problem with the script editor.  I have a script that goes through a spreadsheet Numbers cell-by-cell and examines the background color for each cell.  If the background color is yellow it it turns green.  I couldn't get this script to work therefore inserted a Display Dialog statement in the loop to show what background color has been found.  After seeing the color of a few cells, I hit the button cancel from the dialog box display.  After that I can not open the script editor - it starts but they appear then the beachball and it's there.  Force quit the script editor does not resolve that question does not restart my Mac.  I noticed that there was an update waiting for OS X El Capitan, I have so installed.  Strangely, after the script editor open, and I was able to run the script, but after cancelling the dialog box display I'm stuck now even once - script editor crashes on opening - I still think trying to open my script.  How can I get around this?

    I am running OS X El Capitan, version 10.11.6 MacBook Pro (retina, 13 inches, end 2013) 8 GB of memory

    Original post updated.

    Looks like it is a problem with the Script Editor.  I downloaded a trial version of script debugger and it runs the script without problem. I tried to run other scripts that I knew used to work and that they will not open with the script editor.

    Can I reinstall Script Editor without having to reinstall the entire OS X?

Maybe you are looking for