Resizing custom component with fixed aspect ratio in designer

Hello,
   I have a custom component that can have a fixed aspect ratio depending on certain property settings and I would like to know if there is any way to make the component resize in the designer in the same manner that the XCelcius built-in spreadsheet table component does?
  It is possible to workaround this somewhat by correcting the width or height of the component after resize, XCelsius sees the change and stores it correctly but sometimes the IDE "remembers" the old value. For example if the component changings its own height programmatically in response to a property and then, while keeping the current component selected, the user resizes the width XCelsius sometimes tries to put the old height back even through it has the correct height saved in the XLF and works fine when compiled.
  Is there a way to properly notify XCelsius IDE of a programmatic width/height change in the component itself in response to a property change?
Thanks

The SDK does not support reszing a component using a fixed aspect ratio.
Do not set the width and height of your component directly. You can set the initial size when dropped onto the canvas using the measure function...
A better approach is to let the user size the component on the Xcelsius canvas.
And instead of rendering directly in your add-on, move that code into a child renderer. Then use your aspect ratio to calculate the max size the child renderer can be to fit in the component. Then center your child renderer in the component. That is what I did when I created AnyMap.
|--------------------------------|
| component on canvas            |
|--------------------------------|
|  |--------------------------|  |
|  | centered child renderer  |  |
|  |--------------------------|  |
|  |                          |  |
|  |                          |  |
|  |                          |  |
|  |--------------------------|  |
|--------------------------------|
Regards
Matt

Similar Messages

  • Scaling with fixed aspect ratio

    How can I enforce a resizable application to preserve a fixed aspect ratio?
    I have posted the same question (and also some source code) in the "Script Basics" Forum,
    which might have been not the best choice, since no one answered so far. But I don't think
    that such an obvious request can not be done in a better way than how I did it.
    Thanks

    FilterPunk wrote:
    How can I enforce a resizable application to preserve a fixed aspect ratio?
    I have posted the same question (and also some source code) in the "Script Basics" Forum,
    which might have been not the best choice, since no one answered so far. But I don't think
    that such an obvious request can not be done in a better way than how I did it.
    ThanksscaleY = bind scaleX

  • On Mavericks: Wallpapers with an aspect ratio of 16:9 or 16:10, if set to "center", will either format as "fill screen" or "fit to screen". Help?

    If I select a custom wallpapers with an aspect ratio of 16:9 or 16:10, if set to "center", will either format as "fill screen" or "fit to screen".
    With other aspect ratios, center works as supposed to.
    Ideas?

    In general this script should work:
    mov GPRM0, SPRM14
    and GPRM0, 3072
    Set System Stream St(Subtitle Stream 1) (On) if GPRM 0 = 3072)
    Set System Stream St(Subtitle Stream 2) (On) if GPRM 0 != 3072)
    Jump Track 1
    The value of 3072 is returned when 16:9 value is stored in SPRM14.
    However some players may disregard this script as they might look for the presentation information in IFO files or in the video stream itself.
    The better approach is to flag one subtitle stream as 16:9 and the other as 4:3 in DVD After Edit if you have an access to it.
    MacPro 2.66, G5 DP 2.7   Mac OS X (10.4.9)   TASCAM DA-88, DigiBeta, DeckLink HD Extreme, Cinemacraft Encoder

  • How do I batch resize images with different aspect ratios?

    How do I batch resize images with different aspect ratios?

    poa66 wrote:
    Landscape: I want result to be 1960 x 1103 px and 72 ppi whether the original is 300 ppi or 220 ppi and wether it is 2Mb or 10 Mb. Cropped centered top and bottom.
    There will be a set of Landscapes that that have a narrower aspect ratio the 1960:1103 that would also need the top and bottom cropped like all Portraits would could be.  You need to realize that center cropping Landscape image that have aspect ratios near 1960:1103 will usually produce acceptable compositions.  However Cropping wide panoramas and portraits will only produce acceptable landscape  1960:1103 composition occasionally.
    Here you will see what happens when image have aspect ratio the do not fit the desired aspect ratio.  Where Landscape  are forced to portrait and portrait forced to Landscape.  Here are two Collage I populated with a mixture of image  with different  aspect ratios.   One collage has all 3:2 Landscape places and the other 2:3 Portrait places.
    I create a 1 image 1960x1103 collage 72dpi and create those too. Note the landscape boy foot is cropped off 3:2 is narrow compared to 1960:1103

  • How do i transform a layer with maintain aspect ratio through scripting in Photoshop?

    Hi,
         How do i transform a layer with maintain aspect ratio through scripting in Photoshop? I am expecting your reply.
    thanks,
    Rajiv.s

    I don't think your talking apples to apples.  First I do not know of any Maintain Aspect Ratio icon in Photoshop. The only icon I think associated with transform is the anchor point icon in the option bar for transform. I think you may referring to the constrain check box in the image size dialog which you can check when resample is checked. Image size effect all layers in the document and the documents canvas size. The document canvas size will be changed to the values in the images size dialog and all layers will be transformed by percentage the canvas was changes while maintaining the layers position over the canvas and the layers I think may be cropped so only pixels over the canvas remain.
    I do not know if you know that layers can be any size and have aspect ratios different then the documents canvas.
    In your case it sounds like your describing a template that has a canvas size that is 2000px wide be 3000px high a 2:3 portrait aspect ratio.  Your image file has a landscape aspect. If you place that image into your template place would by default transform the image so the image would fit within the 2000px by 3000px canvas size there would be a white border top and bottom.  You could transform that smart object layer to it actual pixels size activeDocument.activeLayer.resize(100,100, AnchorPosition.MIDDLECENTER); then calculate the size you want to transform its height to. By retrieving the canvas size and the layers boundaries. Divide the canvas height pixel size by the layers pixel height size should give you the percentage you need to use. Make sure you set the ruler units to pixels so your working with pixel values for the canvas and layer size values. The resulting layer will be larger then canvas size keeping the anchor point centered will result in the canvas size masking off both sides.  In effect cropping you landscape to a portrait.  Note cropping a image from one orientation to the other changes the composition drastically.
    If your trying to make a composit like collage you may want to look at my Photoshop Collage Toolkit it will fit images to fill a 2000px by 3000px area http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html
    You could also do centered 2:3 crop that is resized to a 3000px

  • How to use fixed aspect ratio on W520

    Hi I am using W520 with Quadro 1000M.
    I have a question that where's the "Screen size and position" option in the nVidia Control Panel? I need to turn the "Scale with fixed aspect ration" on, but I cannot find it. Can anyone tell me where it is?
    Solved!
    Go to Solution.

    Hi GaryGU
    If you are running Optimus mode, the primary graphic controller will be Intel iGPU, therefore scaling, etc. and other settings would be mainly controlled by Intel(R) Graphics and Media. The configurations in Intel(R) Graphics and Media under Control Panel would be applied for both Intel and Nvidia GPU.
    If you need scaling, go to Control Panel, Intel(R) Graphics and Media, Advanced Mode, Display Tabs, General Settings Sub Tabs, change to a lower resolution and you will see the scaling options appear. (Center Image, Scale Full Screen or Maintain Aspect Ratio).
    No worry, this is normal and this is how Optimus works. Nvidia dGPU would only run when an apps or user demand high amount of graphic processing power.
    Cheers 
    Peter
    =============================================
    Does someone post helps you? Give them a kudos as a reward, as they will do better to improve 
    Mark it as solved if the solution works for you, so it could be reference for others in the future 
    Refunded Set: W510, 4876-A11
    Current Set: W520, 4284-A99
    Dolby Home Theater v4!:
    http://forums.lenovo.com/t5/W-Series-ThinkPad-Lapt​ops/W520-Sound-Enhancement-Thread/m-p/451401#M155... 

  • Does LR handle a dual monitor setup with different aspect ratios (16:9 and 16:10)?

    Does LR 5 handle a dual monitor setup with different aspect ratios (16:9 and 16:10)?
    I'm planing to buy a 27" 16:9 monitor and use it as primary together with a 22" 16:10. Does any have any idea?
    Thanks

    Moreover, the two monitors can have completely different characteristics.  As always, you really need to calibrate/profile any monitor (with a hardware tool - Spyder, Colormunki etc).  That's no more important with two monitors, but you see for sure if you don't, as two dissimilar monitors will then probably look different. 

  • Custom component with additional tags

    Hi. I need to write complicated custom JSF component.
    I know how to write simple custom components, and receive String variables from tag attributes e.g.
    https://github.com/devalentino/temp/blob/master/src/main/java/net/monopolyclub/components/component/UserData.java
    But now I need to write custom component with additional tags (for example like dataTable and column tags).
    How can I write such component? How can I receive collections in my component? How can I work with additional tags in my component.
    for example I need something like:
    <m:chat>
         <m:tab value="#{UserList}" />
         <m:message value="#{MesageMap}" />
    </m:chat>
    where UserList - Collection with current users and MessageMap is Map with User as key and message as value.

    Iam using pt:ptdata.joincurrcommunitydata
    here is some code
    <pt:ptdata.joincurrcommunitydata pt:id="menutabsjoin" />
    <pt:logic.foreach pt:var="temp2" pt:data="menutabsjoin">
    <span class="CommunityPage">
    <pt:core.html href="$temp2.url" pt:tag="a">
    <pt:core.html pt:tag="img" src="$temp2.img" alt="$temp2.title" border="0" align="absmiddle" height="$temp2.imgheight"      width="$temp2.imgwidth" />
                        <pt:logic.value pt:value="$temp2.title" />
                             </pt:core.html>
                             </span>
                             </pt:logic.foreach>
    But the URL that is generated is not having the CommunityID, hence it errors out saying object not found.
    Any help would be appreciated?
    Thanks
    kartik

  • Imported PDF File and unchecked FIXED ASPECT RATIO problems.

    I just don't get it. . . . I have imported a pdf file into MOTION 2, unchecked BOTH Fixed Aspect Ratio boxes on both the media and the layers and I am still getting major rasterization!
    When I scale up the file in Acrobat, there are NO problems. It's something that I am not doing in MOTION.
    Any help is VERY appreciated.
    Thanks
    G5   Mac OS X (10.4.2)  

    I didn't know you could import PDFs...
    Are you putting any filters on it - that causes rasterization...
    Patrick

  • Help with setting aspect ratio

    Could someone please help me with an aspect ratio problem. I have just updated to iMovie 6 and want to work with an existing movie project created from iMovie (version before the ilife 5 version). On opening the project in the new version it is in widescreen and I would like to convert back to a regular format (regular display format) I would be most grateful for any help
    Thankyou

    Well, I guess I thought the video in Motion needed to look more rectangle (16x9) than square (4:3). Since it did in FCP. And my FCP sequence setting>Aspect Ratio says NTSC DV 3:2
    I am used to working with plain MiniDV 4:3. I shoot with Sony PD150. I don't understand or never had to deal with Aspect Ratios. This project they wanted a widescreen look so I switch the camera to 16x9.
    I don't think it is the real 16x9 but like I said I don't know about this stuff or why my camera has 16x9 on in if it is not the real thing.
    Feel free to comment, I am trying to learn

  • HT1338 I have a problem with the aspect ratio of photos as they appear on iPhoto.  They are not correct.  On the original photo people were fat and squat.  I tried rotating and they became long and narrow.  Neither correct.

    I have a problem with the aspect ratio of photos as they appear on iPhoto.  They are not correct.  On the original photo people were fat and squat.  I tried rotating and they became long and narrow.  Neither correct.  Any suggestions?

    Sounds more like a problem with your Display Resolution than iPhoto.
    Go to: Apple / System Preferences / Displays and in the Resolutions list select,
    1280 x 800 if you have a 13" MacBook Pro
    1400 x 900 if you have a 15" MacBook Pro
    1920 x 1200 if you have a 17" Macbook Pro

  • Fixed Aspect Ratio Scaling?

    Hi All,
    I'm playing Fable Mac Version now and my screen resolution is 2048*1152; however, I only want to run at 1600*900. Is there any method to turn on fixed aspect ratio scaling so that the screen will not be fully filled?
    Thank You

    I'm a little confused because both of those resolutions are 16:9 formats, so both would fill a 16:9 screen if the aspect ratio were fixed.

  • Need camcorder with an aspect ratio greater than1,920x1,080 format.

    Some years ago, I saw an ad for a Canon camcorder with an aspect ratio greater than the standard 2:1 ratio (1,920x1,080) format.  It boasted a true cinemascope format (16:9?) Is there something like that available today? Or do I have to go to a professional unit? Thanks for any help.

    Hi ridgerider,
    Thank you for posting.  The 1920 x 1080 resolution that our current camcorder models shoot at is a Full HD 16:9 aspect ratio resolution.  There is no need to move into a professional level model to get Full HD 16:9 video, unless a more professional level model is something you are looking for.
    If this is a time sensitive-matter, additional support options are available at Contact Us.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Help with custom cropping and known aspect Ratio's

    I would like to crop a small part of a larger image with custom / free flow dimensions to the crop and then be able to print / export at a know print friendly aspect ration. An example would be a taking a crop of one person in a couple,from a larger image. The crop is outside common aspect ratios. Can lightroom fit the image to an aspect ratio of my liking whilst maintaining everything I have cropped?
    Thank you in advance

    Clearly we can't get one aspect ratio into a different aspect ratio without either trimming bits off, or else leaving gaps.
    So the best I can suggest is: crop in Develop according to the subject content that you don't want to see.
    Then in Print, set up your print layout (or choose a print template) which contains an image cell of the desired size and shape.
    There are two ways that a photo can be put into such a cell: it can be fitted "loose" so that you always see the whole current crop, leaving white margins as required; or else it can be fitted "tight" using the Zoom to Fill checkbox. In the latter case, LR applies an additional print-only crop which forces the image that is seen, to adopt the shape of the cell. So the aspect ratio of the Develop crop, does not need to have been exact for this precise output.
    This print-only crop will only remove further bits of the photo, not put any back - unlike the Develop crop. But you can slide the image around for the best composition, in terms of what it trims off.
    Your main (Develop) crop has not been altered in any way by doing this, and can of course still be adjusted further also, which will in turn alter how the zoom-to-fill appears.
    [ edit add: The Develop crop might be made specific for a particular print shape, but does not have to be, with the above technique. Maybe one actively wants to retain the camera-original aspect, with other kinds of output in mind. In any case, page margins often mean that the actual printed area is not quite exactly the same shape as the notional page anyway - a "10x8" printed with a half-inch margin on three sides and a three-quarter inch margin on the bottom, would print 9" x 6 3/4" (which is a different shape than 10x8). And all that would need to have been worked out each time, re-cropping the main composition for each different output size, margin width, etc then re-cropping it back again to 3:2 (or whatever) for your web upload. That can be managed through presets, virtual copies, snapshots - but sounds like a lot of extra work to me. My own images are cropped for general purposes, but each one remembers its last print settings also - which places it onto a page in the needed manner.]

  • 16:9 Apple TV export playing with incorrect aspect ratio in iTunes.

    Hi, I've exported a 16:9 PAL movie from FCP using 'Export for Apple TV' which plays fine in Quicktime (1024x576 m4v file), my problem is when I import it into iTunes it changes the aspect ratio to 720x576. If I 'show in Finder' and play the iTunes import using Quicktime it plays fine (1024x576).
    So it seems a problem with iTunes?
    If anyone else has fixed this problem I'd love to know how.
    Many thanks,
    Dave

    For anyone interested...
    I've been in contact with Elgato http://www.elgato.com/elgato/int/mainmenu/home.en.html
    regarding this as they are part of this issue.
    They have confirmed that there is a bug in the latest releases of iTunes that is causing the problem.
    They have been communicating their information to Apple but have had little response to date.
    Maybe we'll get a fix when Apple could be bothered.

Maybe you are looking for

  • New Airport Extreme network won't hold stream to Apple TV

    (I thought about posting this in the Apple TV forum but I think this is more appropriate here.) For months I had a network configured in my home that included two Airport Express base stations. My cable modem plugged directly into one of them (in my

  • IMovie is not showing up on iPod

    I downloaded an iMovie, and it shows up on iTunes, but when I sync my iPod, it isn't there. I haven't had any trouble with tv shows???

  • Audio will not transmit to TV via Displayport

    Please read carefully as I have spent 8 hours on this issue and if you have a simple answer, I have probably already tried it. I want to explain the problem in full detail and get some real tech experts to help. Thank you!! The first thing you need t

  • Naming PDF's  so the "Portfolio" files are viewed in date order

    I'm still learning, but I can't figure out how to label a PDF so that when I create a "Portfolio",  the data appears in numerical order. Hundreds of pages of bank statements need to be ordered by year and date for easy retrieval, research, etc. I wou

  • Maximum no of members in Essbase Dimension can support

    Dear All, I am using Essbase 11.1.2.2 (64-bit) Number of dimensions used in my BSO Essbase cube is 9 (4-dense and 5 sparse). I am having a Customer dimension (sparse) upto 7 levels. The number of members in customer dimension is 98000. After loading