DisplayImageFile() does not change the dimensions of the image control

Hello

I put in an image with DisplayImageFile() control image + assigning to the attribute of control ATTR_FIT_MODE = VAL_SIZE_TO_IMAGE. The image size is larger, then the size of the control and I want the control to resize to the size of the image.

It works fine except when I ask the dimensions of the control with GetCtrlAttribute (panel, control, ATTR_HEIGHT, & height), I get the original size (before calling DisplayImageFile())...

It seems I missed something basic...

Environment: LAB Windows CVI 2012, Windows 7

Thanks in advance

Ramy

I don't know if you still experience this problem or not, but I came across this discussion now and wanted to point out that this could happen if your picture controls if it is covered by another control or is it hidden altogether (and there might be other similar situations that I can't think of right now).

When this happens, the CVI runtime can pull the image directly on the image. Instead, he plans an asynchronous action that will redraw this section of the Panel from the back to the front (if it's just overlapped, not hidden). It is only in the later action that the image is applied to the control, and it is only then that the control is resized to fit the image. This may seem immediate to the casual observer, but, because it is asynchronous, you can't try to get new size immediately after calling DisplayImageFile, because the image is not yet in control at that moment.

Ironically, this occurs only if the control has already been set to the image size at the time you call DisplayImageFile. If this isn't the case, then the new size is applied when you later change the mode made programmatically. Whereas if the adjustment mode has been already updated the image size, trying to programmatically set the same value of the image size has no effect and nothing happens then.

If this is what is happening, one way around this would be to call ProcessDrawEvents or ProcessSystemEvents immediately after the call to DisplayImageFile. Unless the control or Panel has been hidden way explicit, which will require the drawing action will take place at this time, and you should then be able to get the new size of control at any time after that.

Luis

Tags: NI Software

Similar Questions

  • Loading screen does not change the Image

    I have a problem with the field of gif. What I'm trying to do, is show a progress screen that the problem is its not like an animation. Its as if she makes just the first frame of the gif image.

    I have load call that changes the image that some real treatment goes.

    I thnk its happens because of the event put on another thread. but I can't understand that out can you please help me? Here is my code can you please help where I encounter an error.

    DataStore.answeringThread = new AnsweringThread();
    DataStore.answeringThread.start ();

    final LoaderScreen ls = new LoaderScreen();
    ls.setShowLoader (true);
    Status.Show ("Please wait...", 10);
    UiApplication.getUiApplication () .pushScreen (ls);

    /*---*/UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    try {}
    DataStore.answeringThread.join ();
    } catch (System.Exception e)
    {}
    UiApplication.getUiApplication () .popScreen (UiApplication.getUiApplication () .getActiveScreen ());
    UiApplication.getUiApplication () .pushScreen (new Answering());
    }
    });/*--------*/

    I am able to see screeen of loading for the first time, only to change its image as time passes but it isn't happeing instead, it makes only first image. and then the new response screen appears.

    If I comment the code between two - and - image changes as appropriate.

    Your problem is that you use a blocking operation and the Blackberry is never really painted screen.

    There are 2 possible solutions:

    (1) the blocking operation thread. This means that spawn a real thread to use UIApplication.invokeLater () instead.

    (2) paint before calling your blocking with the force operation: Ui.getUiEngine () .repaint (); It means the battery display to repaint and your screen will be permanently shown.

  • getPreferredHeight does not change the height of a LabelField.

    Hello

    I add LabelFields at a screen. I replaced getPreferredWidth and the LabelField getPreferredHeight. GetPreferredHeight however does not change the height of LabelField.

    getPreferredWidth seems to work very well.

    I do not use the default vertical Manager that comes with the screen.

    Ideas/pointers in troubleshooting this would be greatly appreciated.

    -MO.

    Hello

    to change dimensions on a field, you must override the method of layout.

    protected final void layout(final int width, final int height) {
        int yourHeight = super.getFont() * 2;
        super.setExtent(width, yourHeight);
    }
    

    If you want the label is centered vertically, you must override the paint method.

  • Satellite Pro P300 - Fn + f5 combination does not change the monitor

    On two laptops of P300, we have a problem that the fn + f5 combination does not change the layout of the monitor.

    If you press fn + f5, you see the bar where the different modes are displayed, but if you release the layout remains the same (laptop as a single monitor)

    Thank you, best regards,.

    Davy

    Hello

    In my opinion the previous action (installation of the catalyst hotkeys and reinstalled the hotkey driver) is the reason why the FN + F5 does not work properly.

    In my opinion, you should clean the registry first.
    Use CCleaner. It s free and cleans up the registry.
    In addition, you must remove the catalyst shortcut keys because this may affect the Toshiba FN Hotkey feature.
    Finally, install the Toshiba drivers from the Toshiba page
    More info (right on the Toshiba driver page), you will find details on the tools simple and drivers and what are they for...

  • Why an amplification of the RAM does not change the index performnance of windows vista?

    Why an amplification of the RAM does not change the index performnance of windows Vista?

    Hello

    I m not very well, but maybe you have more than 3 GB of RAM and Vista 32 bit.
    Usually the 32 bit OS is capable to manage and send only 3.2 GB.
    The more than 3.2 GB RAM will not operating system used and therefore would not increase the index
    In addition the laptop will be not really faster after upgrading RAM. You will notice better performance using applications at the same time, but this does not affect the index of Vista.
    But this is only my personal hypothesis.

    Welcome them

  • Insert a new CD does not change the last torn CD

    WMP 11 XP SP3 does not change the info of CD in the RIP, a new CD of screening.   WMP 11 found no new updates when updates has been requested.  If I close WMP 11 and reopen WMP11 new info of the CD are correct.  It must be a problem of buffer information.

    If you start XP in clean boot mode, the same problem occurs there?

    In addition, please check if the problem occurs on other users accounts, by creating a new user account in the Control Panel, by logging into that account and trying it.

    Tim Baets
    http://www.BM-productions.TK

  • DMZ-Link bandwidth does not change the routing table countin traffic

    Hey guys

    I'm INE laboratories dong and shoved a weird one that delivers.

    I have configured the dmz-link bandwidtha nd the extended communities to send, I get the bandwidth in the BGP routes, however the routing table does not change the proportion of traffic according to the bandwidth available link.

    Here is my configuration:

    Rack1R6 (config) #do sh run | dry BGP

    router bgp 100

    no synchronization

    The log-neighbor BGP-changes

    BGP dmzlink-bw

    155.1.146.0 netmask 255.255.255.0

    aggregate-address 155.1.0.0 255.255.0.0 summary only

    neighbour 54.1.1.254 distance-54

    neighbor 54.1.1.254 dmzlink-bw

    neighbour 155.1.67.7 distance-300

    neighbour 155.1.146.1 distance-100

    155.1.146.1 neighbor send-community times

    No Auto-resume

    Rack1R6 (config) #.

    Rack1R6 (config) #do sh ip bgp neigh 155.1.146.1 opponents

    Version of BGP table is 35, local router ID is 150.1.6.6

    Status codes: deleted, cushioning d s, history of h, * valid, > best, i - internal.

    r SIDE-failure, stale S

    Source codes: i - IGP, e - EGP,? -incomplete

    Network Next Hop path metrics LocPrf weight

    * > 28.119.16.0/24 54.1.1.254 0 54 I

    * > 28.119.17.0/24 54.1.1.254 0 54 I

    * > 112.0.0.0 54.1.1.254 0 0 54 50 60 I

    * > 113.0.0.0 54.1.1.254 0 0 54 50 60 I

    * > 114.0.0.0 54.1.1.254 0 0 54 I

    * > 115.0.0.0 54.1.1.254 0 0 54 I

    * > 116.0.0.0 54.1.1.254 0 0 54 I

    * > 117.0.0.0 54.1.1.254 0 0 54 I

    * > 118.0.0.0 54.1.1.254 0 0 54 I

    * > 119.0.0.0 54.1.1.254 0 0 54 I

    r > 155.1.0.0 0.0.0.0 32768 I

    Rack1R6 (config) #do sh ip bgp

    Version of BGP table is 35, local router ID is 150.1.6.6

    Status codes: deleted, cushioning d s, history of h, * valid, > best, i - internal.

    r SIDE-failure, stale S

    Source codes: i - IGP, e - EGP,? -incomplete

    Network Next Hop path metrics LocPrf weight

    * i28.119.16.0/24 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254                             0 54 i

    * i28.119.17.0/24 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254                             0 54 i

    * i112.0.0.0 204.12.1.254 0 100 0 54 50 60 I

    * > 0 0 54 50 60 54.1.1.254 I

    * i113.0.0.0 204.12.1.254 0 100 0 54 50 60 I

    * > 0 0 54 50 60 54.1.1.254 I

    * i114.0.0.0 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254               0             0 54 i

    * i115.0.0.0 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254               0             0 54 i

    * i116.0.0.0 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254               0             0 54 i

    * i117.0.0.0 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254               0             0 54 i

    * i118.0.0.0 204.12.1.254 0 100 0 54 I

    Network Next Hop path metrics LocPrf weight

    *>                  54.1.1.254               0             0 54 i

    * i119.0.0.0 204.12.1.254 0 100 0 54 I

    *>                  54.1.1.254               0             0 54 i

    r i155.1.0.0 155.1.146.4 0 100 0 I

    r>                  0.0.0.0                            32768 i

    s > 155.1.146.0/24 0.0.0.0 32768 0 I

    * > i205.90.31.0 155.1.13.3 0 100 0 200 254?

    * 155.1.67.7 0 300 200 254?

    * > i220.20.3.0 155.1.13.3 0 100 0 200 254?

    * 155.1.67.7 0 300 200 254?

    * > i222.22.2.0 155.1.13.3 0 100 0 200 254?

    * 155.1.67.7 0 300 200 254?

    Rack1R6 (config) #.

    # now R4 configuration

    Rack1R4 (config) #do sh run | dry BGP

    router bgp 100

    no synchronization

    The log-neighbor BGP-changes

    BGP dmzlink-bw

    155.1.146.0 netmask 255.255.255.0

    aggregate-address 155.1.0.0 255.255.0.0 summary only

    neighbour 155.1.45.5 distance-200

    155.1.45.5 route-neighbour card GAME-54 on

    neighbour 155.1.146.1 distance-100

    155.1.146.1 neighbor send-community times

    neighbour 204.12.1.254 distance-54

    neighbor 204.12.1.254 dmzlink-bw

    No Auto-resume

    Rack1R4 (config) #.

    Rack1R4 (config) #do sh ip bgp Synt.

    Local router BGP 150.1.4.4 identifier UNDER number 100

    BGP table version is 18, table 18 main routing version

    15 entries for network using 1980 bytes of memory

    18 entries for path using 936 bytes of memory

    9/7 BGP path/bestpath attribute entered using 1512 bytes of memory

    3 entries for BGP AS-path ACCESS using 72 bytes of memory

    1 entries PMO community, using 24 bytes of memory

    0 cache entries of BGP route-map with 0 bytes of memory

    0 cache entries of filter-list BGP using 0 bytes of memory

    Bit entries in the cache field: 3 courses (up to 5) with 96 bytes of memory

    BGP using 4620 total number of bytes of memory

    Activity 102/87 BGP prefixes, 243/225, scan interval to 60 seconds

    Neighbor MsgRcvd MsgSent V AS TblVer InQ OutQ Up/Down State/PfxRcd

    155.1.45.5 4 200 8615 8640 18 0 0 07:38:02 3

    155.1.146.1 4 100 8761 8668 18 0 0 00:14:34 3

    204.12.1.254 4 54 8724 8595 18 0 0 07:38:02 10

    Rack1R4 (config) #do sh ip bgp

    BGP table version is 18, local router ID is 150.1.4.4

    Status codes: deleted, cushioning d s, history of h, * valid, > best, i - internal.

    r SIDE-failure, stale S

    Source codes: i - IGP, e - EGP,? -incomplete

    Network Next Hop path metrics LocPrf weight

    * > 28.119.16.0/24 204.12.1.254 0 0 54 I

    * > 28.119.17.0/24 204.12.1.254 0 0 54 I

    * > 112.0.0.0 204.12.1.254 0 54 50 60 I

    * > 113.0.0.0 204.12.1.254 0 54 50 60 I

    * > 114.0.0.0 204.12.1.254 0 54 I

    * > 115.0.0.0 204.12.1.254 0 54 I

    * > 116.0.0.0 204.12.1.254 0 54 I

    * > 117.0.0.0 204.12.1.254 0 54 I

    * > 118.0.0.0 204.12.1.254 0 54 I

    * > 119.0.0.0 204.12.1.254 0 54 I

    * > 155.1.0.0 0.0.0.0 32768 I

    s > 155.1.146.0/24 0.0.0.0 32768 0 I

    * i205.90.31.0 155.1.13.3 0 100 0 200 254?

    *>                  155.1.45.5                             0 200 254 ?

    * i220.20.3.0 155.1.13.3 0 100 0 200 254?

    *>                  155.1.45.5                             0 200 254 ?

    * i222.22.2.0 155.1.13.3 0 100 0 200 254?

    Network Next Hop path metrics LocPrf weight

    *>                  155.1.45.5                             0 200 254 ?

    Rack1R4 (config) #do sh ip bgp neigh 155.1.146.1 opponents

    Rack1R4 (config) #do sh ip bgp neigh 155.1.146.1 opponents

    BGP table version is 18, local router ID is 150.1.4.4

    Status codes: deleted, cushioning d s, history of h, * valid, > best, i - internal.

    r SIDE-failure, stale S

    Source codes: i - IGP, e - EGP,? -incomplete

    Network Next Hop path metrics LocPrf weight

    * > 28.119.16.0/24 204.12.1.254 0 0 54 I

    * > 28.119.17.0/24 204.12.1.254 0 0 54 I

    * > 112.0.0.0 204.12.1.254 0 54 50 60 I

    * > 113.0.0.0 204.12.1.254 0 54 50 60 I

    * > 114.0.0.0 204.12.1.254 0 54 I

    * > 115.0.0.0 204.12.1.254 0 54 I

    * > 116.0.0.0 204.12.1.254 0 54 I

    * > 117.0.0.0 204.12.1.254 0 54 I

    * > 118.0.0.0 204.12.1.254 0 54 I

    * > 119.0.0.0 204.12.1.254 0 54 I

    * > 155.1.0.0 0.0.0.0 32768 I

    * > 205.90.31.0 155.1.45.5 0 200 254?

    * > 220.20.3.0 155.1.45.5 0 200 254?

    * > 222.22.2.0 155.1.45.5 0 200 254?

    Total number of prefixes 14

    Rack1R4 (config) #.

    # and where is the real problem, R1

    Rack1R1(config-Router) #do sh ip bgp

    Version of BGP table is 15, local router ID is 150.1.1.1

    Status codes: deleted, cushioning d s, history of h, * valid, > best, i - internal.

    r SIDE-failure, stale S

    Source codes: i - IGP, e - EGP,? -incomplete

    Network Next Hop path metrics LocPrf weight

    * i28.119.16.0/24 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i28.119.17.0/24 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i112.0.0.0 54.1.1.254 0 100 0 54 50 60 I

    * > I 204.12.1.254 0 100 0 54 50 60 I

    * i113.0.0.0 54.1.1.254 0 100 0 54 50 60 I

    * > I 204.12.1.254 0 100 0 54 50 60 I

    * i114.0.0.0 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i115.0.0.0 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i116.0.0.0 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i117.0.0.0 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i118.0.0.0 54.1.1.254 0 100 0 54 I

    Network Next Hop path metrics LocPrf weight

    * > I 204.12.1.254 0 100 0 54 I

    * i119.0.0.0 54.1.1.254 0 100 0 54 I

    * > I 204.12.1.254 0 100 0 54 I

    * i155.1.0.0 155.1.146.6 0 100 0 I

    * > I 155.1.146.4 0 100 0 I

    * > 205.90.31.0 155.1.13.3 0 200 254?

    * i 155.1.45.5 0 100 0 200 254?

    * > 220.20.3.0 155.1.13.3 0 200 254?

    * i 155.1.45.5 0 100 0 200 254?

    * > 222.22.2.0 155.1.13.3 0 200 254?

    * i 155.1.45.5 0 100 0 200 254?

    Rack1R1 (config - Router) # do sh ip bgp 112.0.0.0

    112.0.0.0/8, version 4 BGP routing table entry

    Paths: (2 available, best #2, table by default-IP-Routing-Table)

    MPIO: eBGP iBGP

    Announced for the update-groups:

    1          2

    54 50 60, (from a customer-RR)

    54.1.1.254 (metric 2560002816) of 155.1.146.6 (150.1.6.6)

    Origin, IGP, 0, 100, valid, internal multipath localpref metric.

    DMZ-Link Bw 250 KB

    54 50 60, (from a customer-RR)

    204.12.1.254 (metric 2560002816) of 155.1.146.4 (150.1.4.4)

    Origin, IGP, metric 0, localpref 100, valid, internal, multipath, best

    DMZ-Link Bw 12500 KB

    Rack1R1(config-Router) #do sh ip route 112.0.0.0

    Routing for 112.0.0.0/8 entry

    Known through 'bgp 100', 200, 0 distance metric

    54, internal type tag

    Last update of 204.12.1.254 ago 00:15:30

    Routing descriptor blocks:

    204.12.1.254, 155.1.146.4, there is 00:15:30

    Path metric is 0, number of shares of traffic 1

    AS hop 3

    Beacon road 54

    * 54.1.1.254, 155.1.146.6, there is 00:15:30

    Path metric is 0, number of shares of traffic 1

    AS hop 3

    Beacon road 54

    Rack1R1 (config - Router) #.

    as you can see, the BGP process in R1 receives the correct link DMZ bw but not indeed take...

    can you please help me if I makeover anything in my setup?

    Hello

    Can you please make sure you have a value of bandwidth on ALL your BGP peering physical interfaces? And you can also include the running-config 'router bgp XXXX' out of R1 as you have not understood what we (others are). Just to make sure that you have "bgp dmzlink-bw' configured on all peerings and overall in the process - it will still show in the output of the same community if it does not work on it.

  • After the upgrade to 6, security server does not change the listening Port

    Came across a weird situation where after upgrading a server security 6.1.0 - 2509221, it does not change the listening SSL port during the upgrade, it was not on the standard SSL port.

    It was initially configured to listen on 444 before the upgrade, after the upgrade, I tried to go back to 443 and a netstat-ban shows that it is listening on port 444.

    I double checked the config.properties file and there is no entry for serverPort, and configuration shows 443 in the admin View handler.

    -Re-apply the configuration via the web page does no change, always tuned to 444.

    -Don't restart the service of security server no change, still plays on 444.

    -Restart of the server, no change, still plays on 444.

    -Statically placed serverPort = 443 in the config.properties, always tuned to 444.

    All ports are verified open, 443, 444 and so I think I could have hit a bug. Someone else has security servers that listen on non-standard ports SSL?

    A complete reinstallation of the Security server is provided, changing the port to listen 443, shouldn't have to do that well.

    You checked config.properties, but did you check in locked.properties for the port setting see if it's been moved there before and during the upgrade? Locked.Properties replaces all the configuration settings.

  • Does not change the language when I change my preference-applications-Applanguage on creative cloud. No way to get around?

    Does not change the language when I change my preference-applications-Applanguage on creative cloud. No way to get around?
    It is important to Swedish to English in the case.


    Thank you!

    Please, try the following steps:

  • Importing APEX app with PL/SQL does not change the id as requested app

    Oracle DB XE 11 GR 1 material

    APEX 4.2.2

    RHEL 6.3

    ------------------

    The following code segment any an APEX application which has been exported successfully.  However, even when given a 'new' id of the application, the 'old' within the export application id is still used.

    What could be wrong? In other words, how can I make sure that the 'new' id of the application is used and it overrides the 'old' id of the application that comes with the APEX app export file?

    declare...

    wwv_flow_api.set_security_group_id (p_security_group_id = > v_secgrp_id);
    apex_application_install.set_application_id (t_new_app);  # does not change the new app app ID id
    ....

    exception
    while others
    .....
    end;
    /

    @APEX_export.sql;

    commit;

    Thank you.

    It turns out that the code above (6) works very well.  My development environment has a problem with the workspace is not found.  Tried the code in a test environment and it worked.

    Thank you.

  • Why Muse does not change the names of certain images or property when exporting to HTML format?

    Why Muse does not change the names of certain images or property when exporting to HTML format? and how can I keep the integrity of the name that the image/file has been saved as?

    General Muse renames a file imported image if the image is modified to achieve the design or the exit, or if the name change was necessary due to a name conflict (two different images which had the same file name when importing).

    The design-time features that will modify an image include cropping, rotation, rounded corners and effects (drop shadow, bevel or glow). It is also true that, in rare cases, Muse will merge an image with other content to optimize page download performance. An example of this would be to place a background image on a block of text that contains the text using system fonts. In this case, rather than a single image for text output and a separate image for the background, Muse will combine the two into a single image.

    If an image is placed or imported by Muse and not tampered with, the image is crossed without modification (including the file name) at export/publish (with him except that Muse will always rename if two different images with the same name).

  • Access policy does not change the status of resource

    I have a set access policy to assign a role and a resource to anyone in a specific group. The policy work very well for those who have never had the resource before. For people who were in a disabled state resource - access policy is to add the role, but it does not change the State of the resource from disabled to enabled (or put into service).

    How can I do so it adds not only the role, but he changes the State of the handicapped resource? Thanks in advance.

    Simple!

    -Create an adapter of the entity during the prior insertion of the Members Group.Group of the user who will be called on the user being part of the group. Add custom java code that will check the resource assigned to this user and confirm if its there and in a disabled state. If its disabled and then turn it back on, otherwise just hang on and do nothing.

    Thank you

    Sunny

  • Windows Messaging does not mask the images in emails after installing ie9

    I have Windows Mail to block images in my emails, but that after the installation Internet Explorer9 windows mail does not block the images in my emails even if the parameters are always the same. I had to uninstall ie9 for this reason, except that ie9 seems to work. Vista Home Premium SP2.

    Stringy salvation,

    Try to upgrade to windows live mail 2011 and check if it works with IE9.
    Maybe just the problem of the software with Windows mail.

    http://explore.live.com/Windows-Live-Mail?OS=other

  • The source does not contain the Image of HP recovery

    I am trying to create a bootable USB key with the HP recovery disk creation utility. After having moaned that my 8560w was working on battery power, and that he has no place on a USB stick formatted to FAT32 16 GB, I finished in the next screen that says ""source drive does not contain the Image of HP recovery " which is wrong: D partition is the main, contains the recovery disc." So what? Cannot create a recovery disk? Also note that I have no Recovery Manager (?) and F11 never worked (?). Decision of HP out of the PC business is probably the best thing that can happen to the customers.

    pher

    Hello

    See the link below:

    Creation of recovery disks or saving a recovery Image on a USB drive (Windows 7)

    Quote from this document:

    "Use a blank USB key with at least 32 GB of memory. HP recommends using a brand name of a manufacturer, to trust you. »

  • Why, when I send an email using windows mail (RoadRunner ISP) sometimes it does not transmit the image that are in the original.

    Why, when I send an email using windows mail (RoadRunner ISP) sometimes it does not transmit the image that are in the original.

    Some messages are not complying with the standards of the Internet and the images do not show before their delivery.  You can overcome this by transmitting the message as an attachment instead, and then the images will be intact.

    Steve

Maybe you are looking for