Setting AFrame height to the height of a graphic inside aframe plus padding

Hello fellows,
I am trying to set a permanent bottom padding between an anchored frame and a graphic object (embedded Visio) that is inside the anchored frame.
However, instead of getting that padding below the graphic, the aframe becomes really small, and only 20% of the graphic is exposed.
The code goes like this:
SET vFrame = vCurrentDoc.FirstGraphicInDoc;
Loop While(vFrame)
IF vFrame.ObjectName = 'AFrame'
SET vFrame.AnchorType = AnchorBelow;
SET vFrame.GraphicIsSelected = 1;
SET vGraphic = vFrame.FirstGraphicInFrame // Select the 1st graphic in the frame
SET vFrame.Width = vFrame.TextLoc.InTextObj.Width;
SET vFrame.Height= vGraphic.Height + 5mm; //Here is the padding of 5mm
Set vGraphic.LocY = 0mm;
Set vGraphic.LocX = (vFrame.Width - vGraphic.Width) / 2;
ENDIF
Please, advise!
Thank you!

This works for me:
// Set a variable for the active document.
Set oDoc = ActiveDoc;
// Set a variable for the selected anchored frame.
Set oAFrame = oDoc.FirstSelectedGraphicInDoc;
// Update the anchored frame's position.
Set oAFrame.AnchorType = AnchorBelow;
// Set the width of the anchored frame to match the containing text column.
Set oAFrame.Width = oAFrame.TextLoc.InTextObj.Width;
// Get the first graphic in the anchored frame.
Set oGraphic = oAFrame.FirstGraphicInFrame;
// Make the anchored frame's height 5 mm taller than the graphic.
Set oAFrame.Height = oGraphic.Height + 5mm;
// Move the graphic to the top of the anchored frame.
Set oGraphic.LocY = 0;
// Center the graphic horizontally in the anchored frame.
Set oGraphic.LocX = (oAFrame.Width - oGraphic.Width) / 2;
After you get it tested, then put it in a function:
Set oDoc = ActiveDoc;
Set oAFrame = FirstSelectedGraphicInDoc;
Set iResult = AdjustAFrameAndGraphic{oAFrame};
Function AdjustAFrameAndGraphic oAFrame
Local oGraphic(0);
// Update the anchored frame's position.
Set oAFrame.AnchorType = AnchorBelow;
// Set the width of the anchored frame to match the containing text column.
Set oAFrame.Width = oAFrame.TextLoc.InTextObj.Width;
// Get the first graphic in the anchored frame.
Set oGraphic = oAFrame.FirstGraphicInFrame;
If oGraphic
  // Make the anchored frame's height 5 mm taller than the graphic.
  Set oAFrame.Height = oGraphic.Height + 5mm;
  // Move the graphic to the top of the anchored frame.
  Set oGraphic.LocY = 0;
  // Center the graphic horizontally in the anchored frame.
  Set oGraphic.LocX = (oAFrame.Width - oGraphic.Width) / 2;
EndIf
EndFunc // -------------------------------------------------------------------
-Rick

Similar Messages

  • Can I turn off the setting that displays the height and width in a little black box when using the marquee tool?

    In Photoshop CC, on a mac...
    When using the marquee selection tool, a little black box pops up next to the curser and displays in real time, the height and width of the selection.  The same annoying box also appears when dragging an item with the move tool, displaying the numerical location of the cursor.  Is there anyway to turn off the display of that little black box?  It is driving me bonkers.

    Under the preferences cmd/ctrl-k click on "Interface". At the bottom of the UI is a drop down box for show transformation. Set that to "Never"

  • How to set the height of a textarea dynamically

    Hi,
    I have been trying to set the ui.textarea's height dynamically and I am not able to do it. This is what I am doing.
    <ui:textArea binding="#{assignment$EditResult.textArea2}" id="textArea2" style="height: 90%" text="#{currentRow.value['comments']}"/>
    The height is being ignored and it is set to the default size. How can I set the height of this component to fit to the size of its cell, which is dynamic?
    Thanks for your help.

    Thank you for your help! It worked for something like this:
    getTextArea2().setStyle("color : red");
    but this does not work still.
    getTextArea2().setStyle("height: 90%");
    I think it still does not know the size of the cell at this point yet. But this is a good tip, thanks anyway!
    ~Kazzie

  • Using JDAPI to set the height of the Forms Canvas to it's default value

    Hi,
    I've been trying for a while to use the JDAPI to set the height of the Oracle Form Canvas to it's default value.
    Can anyone advice how to do this ?
    Can the currCanvas.inheritProperty(arg0) be used in this case ?
    Thanks in advance,
    regards

    Hi David,
    Note that I used a Footer Row in my Table. Headers and Footers have special properties. (A poster in the last couple of weeks asked for a summary of Header and Footer properties - somewhat frustrated that he couldn't find a succinct description in the User Guide. Well, there isn't one and the answer is so complicated that nobody has taken on the project. Now we have a new version of Numbers and the answer would need to change.)
    The way to avoid the error is to use a Footer Row and to use the shortcut cell reference notation: =SUMIF(C,TRUE,B). The columns are specified, but the row range is not. Footers are exempt in this notation, so no error is generated regarding a circular reference.
    Hope this clears it up.
    Jerry

  • How can I set the height of ui:pageSeparator to less than 24px?

    I've tried setting the height style but that appears to be ignored.

    I have tried setting the height property of the page separator, but still the height in the IDE & in the browser is more then 7px. Is there a solution?
    This is the style property value of the page separator.
    border-width: 0px; margin: 0px; padding: 0px; height: 7px

  • Set the height of an anchored (inline) frame

    Hi
    I have a text frame with an inlined (anchored) text frame. Now I want to change the height of the inlined text frame.
    How can I do that?
    I try it with IPageUtils::DoSetHeight. If I do this, the height is set but the anchored box is not at the same position like before. She is moved upward. What could be wrong?
    Thanks for the support.
    Greetz
    Hans

    Hi
    I have a text frame with an inlined (anchored) text frame. Now I want to change the height of the inlined text frame.
    How can I do that?
    I try it with IPageUtils::DoSetHeight. If I do this, the height is set but the anchored box is not at the same position like before. She is moved upward. What could be wrong?
    Thanks for the support.
    Greetz
    Hans

  • Setting the height of detail section with RAS SDK

    Hi, all,
    is it possible to locate a section (CrystalDecisions.ReportAppServer.ReportDefModel.Section) in a reportk you and set its maximum height?
    When I find a detail section in question like so section = reportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[counter];
    it just gives me the height of one row.
    Is there a way to set a maximum size of it?
    Thank you!

    Hi Jelena,
    see the below sample to add a new section to the report.
    http://scn.sap.com/docs/DOC-6025
    in the sample, see below code how the section properties are set.
    //Set the properties for the section
        boSection.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail;
        boSection.Name = "Detail2";
        boSection.Height = 1000;
        boSection.Width = 11520;
    Refer to above sample and write your own code to identify the section and then set the properties.
    Othe RAS SDk samples are here.
    http://scn.sap.com/docs/DOC-28646
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Set the height and width of a new browser window

    I am trying to open a new browser window when the user clicks
    on an audio. The audio will be played in the new browser window.
    The only problem I have is that I cannot set the height and width
    of the new browser window. I need the window to be much smaller.
    How can I do this in flash?

    You need to ask on a JavaScript forum. Java != JavaScript

  • How to set row height of the row in the interactive report?

    Some of the values in the columns of my interactive report are wrapped up changing the height of the row to 2 or 3 characters.
    Is there any way to change it? I would like to have all rows set to 2 characters height.
    Robert

    Add the following style sheet to the page HTML Header.
    <style>
    table.apexir_WORKSHEET_DATA td {
      height: 2.8em;
    </style>

  • Get the height of a report to use for setting height of subreport

    I am getting an error:  Invalid Section Height   on one of my subreports
    that I am programmatically inserting into a report.  I have not set the
    subreport height, I thought that it would be automatically set if I didn't
    set it.   I am measuring the width of a section in the report I am using
    for a subreport to use as the Width for the subreport, but not sure how
    to get the height of the report.   It appears this needs to be in pixels.
    I have manually tried setting it to 14400, which I believe is 11" and I ge an invalid section height error.
    How do I get the height for the subreport???  
    I am using VB.Net 2008, Crystal 2008, Vista Buisiness.   - All the latest service packs of everything.
    Thanks,
    Jeff

    Hi Jeff,
    The easiest way to figure this out is to test it in the Crystal Reprot Designer first. Bascially you can't set the subreport higth larger than the report page itself. CR needs to allocate space for the Page header and footer then Group header/footer and detail sections. There are options when designing this in CR Designer which will allow you to span more than one page. The simplest way is to design a template report in Crystal Report Designer so you can see all the options required to make this work. Then you can set the same in code when inserting.
    Remember "If it can't be done in the Report Designer it can't be done in code" The Designer uses the same set of API's as .NET. By using a test report you can then see what settings are being configured when you get the info in code.
    It believe you simply need to set the Can Grow options. Test this in the Designer then update us if you have any more questions.
    Thank you

  • Is there any way to set the height of choice list or list of values?

    Hello Everyone,
    (Jdeveloper: 11.1.2.1.0)
    I recently created a page with some fields as choice lists and some as list of values. Somehow the choice list when opened it is not displaying data properly (I have 3 rows, it is showing only 2 rows and have to scroll to see third row) . I would like to see if there is any way to set this so that I can see all three rows or set the height of choice list as a fixed height?
    Thanks,
    Ravi Nuka.

    Hi Manish,
    sorry for the delay, here the code for the list binding from vo.xml
      <ListBinding
        Name="LOV_SetOfBooks"
        ListVOName="NfSetOfBooksRVO1"
        ListRangeSize="-1"
        NullValueFlag="none"
        MRUCount="0"
        ComboRowCountHint="10">
        <AttrArray Name="AttrNames">
          <Item Value="SetOfBooks"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="SetOfBooksName"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="SetOfBooksName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
    <ViewAttribute
        Name="SetOfBooks"
        PrecisionRule="true"
        EntityAttrName="SetOfBooks"
        EntityUsage="EdContractsEO"
        AliasName="SET_OF_BOOKS"
        LOVName="LOV_SetOfBooks">
        <Properties>
          <SchemaBasedProperties>
            <DISPLAYWIDTH
              Value="30"/>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>Thanks,
    Ravi Nuka

  • To set height of the TableHeader -

    How can i set the Height of the Table Header of the JTable .
    I want to change the hieght of the TableHeader at runtime
    Renjith K. V

    I hope this piece of code would help you how to do that.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test extends JFrame
        public Test()
            JTable table = new JTable(3,3);
            JScrollPane pane = new JScrollPane(table);
            getContentPane().add(pane);
            pack();
            setVisible(true);
            final JTableHeader header = table.getTableHeader();
            System.out.println("Header: "+header.getPreferredSize());
            new Thread()
                public void run()
                    System.out.println("In method run");
                    for(int i=0; i< 5; i++)
                        try
                            Thread.sleep(2000);
                            header.setPreferredSize(new Dimension(225,20*i));
                            header.resizeAndRepaint();
                        catch(InterruptedException e)
                            e.printStackTrace();
            }.start();
        public static void main(String args[])
            new Test();
    }Thanks,
    Kalyan

  • Set the height between lines in Eclipse

    Hello,
    First of all, I'm sorry my question is not related directly to Java, but it's related to Eclipse. I want to know how I can change the height between lines of code in Eclipse.
    Can anybody help me, please?
    Thanks.

    I don't know if this is of any help, but you can change the fonts and
    maybe another font is more what you want.
    Go to: Window>Preferences>Workbench>Colors and Fonts>Java
    and select another font and adjust its point size. You can't directly
    change the vertical spacing between lines though.
    kind regards,
    Jos

  • A problem with the height of the sidebars on my website

    I am trying to make a website for one of my modules in college and I have come across a little problem.
    http://joehowlin.com/onlinesafety/index.htmlhttp://joehowlin.com/onlinesafety/index.html
    The left hand sidebar doesn't extend down to the footer (the same would  happen to the right hand sidebar if the text wasn't there). I have tried  to set the height of the sidebar to 100% and it didn't change the  height at all.
    I can't really have the sidebars at a set pixel height because there will be different amount information on different pages.
    I was told of a way to do it by having the height defined in the <html> tag, but that casues some validation errors and I want to try get my website as html valid as I can.
    Does anyone know of a way that can help me?

    Equal Height CSS Divisions -
    http://forums.adobe.com/message/3264374#3264374
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How to change the width and height of the visible part of the of the report

    I have define a report with paper size 'Letter', orientation 'landscape' and 30 columns. Dynamically I am changing width of columns and suppressing many columns of the report.
    Mostly using first 16-20 columns and others get suppressed.
    Now problem is that when navigating the report thru crystal viewer, a huge blank spaces getting display on right of the report. When we take jump to some part of report thru navigation tree, the whole report gets shifted to left and only blank part is visible and it is required to scroll left.
    Even printing is not working correctly.
    Is there any way to change the width and height of the visible part of the report in the viewer thru .net classes? Setting the width and height of the report in Load event handler doesn't help.  
    Example: CrystalReportViewer1.Width = 200; - is not helping.
    Is there any other solution?
    Please let me know.
    Thanks
    Mahesh Patel

    Hi Yogesh,
    Your suggestion 'reportDocument.PrintOptions.PaperSize=PaperSize.PaperLedger;' along with 'PaperOrientation' setting as follow works fine. I tried to switch between Landscape and Portrait depending on report width.
    reportDocument.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
    But problem with crystal viewer remain as it is.
    While navigating report thru crystal viewer, when we take jump to some part of report thru navigation tree, the whole report gets shifted to left and it is required to scroll left.
    Thanks for your very good suggestion.
    Mahesh Patel

Maybe you are looking for

  • How to write a sql query to retrieve data entered in the past 2 weeks

    Hi, I have file names and last accessed date(java.sql.Date format) stored in my database table, I would like to know how I can write a query to get the name of files accessed in the past 2 weeks,I use open sql server at the back end. Thanks in advanc

  • Thunderbolt Transfer iMac to iMac?

    Hi, I have just brought a 2nd iMac 27" both exactly the same running X 10.8.4 I want clone the new one with old one. I tried using the Immigration Assistant using Thunderbolt but I couldn't get it to work. Any suggestions?

  • Remove Server from /private/Network/Servers?

    I'm integrated with a Windows AD Network. We moved this user's home directory to another server but the old server still shows up in /private/Network/Servers and if the woman tries to save something to the old server instead of going to the server (s

  • Issues using Elements 12 as an Aperture 3 plug in

    I have just upgraded to Elements 12 from Elements 9. When I use Elements 12 as a plug in from Aperture 3 it creates a PSD file, opens up Elements 12 in Editor, but does not export the image over. Any suggestions why?

  • Timesheet Approval - ECC6

    Hi, I am facing difficulties in configuring the Approve work time -> Define Approval Views in ECC6. Please help. Thanks in Advance. Regards, Venugopal.R