Custom Control - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Custom Control

Last post 01-20-2006 09:20 AM by Greg Collins. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-19-2006 04:21 PM

    Custom Control

    I want my custom control code to be aware of the size of the control as set in the design mode,

    When I add the control to the view, I have the following in the view.xsl, I want to be able to initialize my control's size to the sizes given in the <object> tag..

    Is the CtrlID a way to access this ?


    <object class="xdActiveX" hideFocus="1" style="WIDTH: 100px; HEIGHT: 20px" classid="clsid:1fee489f-a555-4408-8fbf-3f69f8c57a43" tabIndex="0" tabStop="true" xd:xctname="{{1fee489f-a555-4408-8fbf-3f69f8c57a43}}" xd:CtrlId="CTRL302" xd:enabledValue="true" xd:enabledProperty="Enabled" xd:bindingType="text" xd:bindingProperty="Value" xd:boundProp="xd:inline" contentEditable="false" xd:binding="//ns1:ClinicalDocument/ns1:recordTarget/ns1:patientRole/ns1:id/@extension">
    <xsl:if test="function-available('xdImage:getImageUrl')">
    <xsl:attribute name="src">
    <xsl:value-of select="xdImage:getImageUrl(//ns1:ClinicalDocument/ns1:recordTarget/ns1:patientRole/ns1:id/@extension)"/></xsl:attribute>
    </xsl:if>
    <param NAME="AccessibleDescription" VALUE=""/>
    <param NAME="Visible" VALUE="True"/>
    <param NAME="BackColor" VALUE="Control"/>
    <param NAME="Dock" VALUE="None"/>
    <param NAME="ForeColor" VALUE="WindowText"/>
    <param NAME="Cursor" VALUE="Default"/>
    <param NAME="BackgroundImage" VALUE=""/>
    <param NAME="AccessibleRole" VALUE="Default"/>
    <param NAME="ImeMode" VALUE="NoControl"/>
    <param NAME="AutoScrollMargin" VALUE="0, 0"/>
    <param NAME="Location" VALUE="0, 0"/>
    <param NAME="AllowDrop" VALUE="False"/>
    <param NAME="AutoScrollMinSize" VALUE="0, 0"/>
    <param NAME="Tag" VALUE=""/>
    <param NAME="Size" VALUE="94, 26"/>
    <param NAME="TabIndex" VALUE="0"/>
    <param NAME="RightToLeft" VALUE="No"/>
    <param NAME="Anchor" VALUE="Top, Left"/>
    <param NAME="TabStop" VALUE="True"/>
    <param NAME="Font" VALUE="Verdana, 13world"/>
    <param NAME="AutoScroll" VALUE="False"/>
    <param NAME="Name" VALUE="UserControl1"/>
    <param NAME="CausesValidation" VALUE="True"/>
    <param NAME="Enabled" VALUE="True"/>
    <param NAME="ContextMenu" VALUE="(none)"/>
    <param NAME="AccessibleName" VALUE=""/>
    </object>


  • 01-19-2006 07:35 PM In reply to

    Hi Richard,
    I don't think this is possible without writing code. All of the controls in the view have object info and you can query that through the InfoPath object model (check out the link to the SDK in our Resources section if you haven't downloaded it already for a full reference to the OM). In addition, I will ask Greg to respond to the question above.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 01-20-2006 09:20 AM In reply to

    If you cannot get what you need from the control itself, one alternative is to write code to load the XSL into a DOM and then do an XPath query for your object/param[NAME="Size"]/VALUE. This string value can then be broken out into its X/Y components for initialization via code or some other means.

    Greg Collins [InfoPath MVP]
    InfoPath Dev
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.