Auto Extending Verticle Lines

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • colemanj4

    #1

    Auto Extending Verticle Lines

    Hello,

    In Report Design View in the Detail Section I have several vertical
    lines that I would like to autoextend with the length of the detail
    section. This is becasue I have a memo field that "Can Grow" so that
    it can fit all the information that the users input.

    If anyone knows how to do this for the lines that would be greatly
    appreciated. Thanks,

    --Jason Coleman

  • spier

    #2
    Re: Auto Extending Verticle Lines

    On Jun 4, 11:28 am, colemanj4 <colema...@gmai l.comwrote:
    Hello,
    >
    In Report Design View in the Detail Section I have several vertical
    lines that I would like to autoextend with the length of the detail
    section. This is becasue I have a memo field that "Can Grow" so that
    it can fit all the information that the users input.
    >
    If anyone knows how to do this for the lines that would be greatly
    appreciated. Thanks,
    >
    --Jason Coleman
    This will be really tricky:

    for each vertical line, create two textboxes with the memo field as
    ControlSource. It is important that both have same CanGrow, CanShrink,
    Width and Height properties;
    Drag&drop both to the same place, with just some pixels horizontal
    difference between them;
    The textbox in background, define its backColor and bordercolor to
    black;
    The textbox in foreground, backColor and borderColor = Transparent or
    white;
    Voilà. You have a vertical line, witch widht corresponds to the
    horizontal difference between fore and back textboxes.

    I told you it would be tricky!

    Comment

    • colemanj4

      #3
      Re: Auto Extending Verticle Lines

      Wow! That works perfectly! Thanks a lot!

      --Jason Coleman

      On Jun 4, 2:16 pm, spier <spie...@yahoo. comwrote:
      On Jun 4, 11:28 am, colemanj4 <colema...@gmai l.comwrote:
      >
      Hello,
      >
      In Report Design View in the Detail Section I have several vertical
      lines that I would like to autoextend with the length of the detail
      section. This is becasue I have a memo field that "Can Grow" so that
      it can fit all the information that the users input.
      >
      If anyone knows how to do this for the lines that would be greatly
      appreciated. Thanks,
      >
      --Jason Coleman
      >
      This will be really tricky:
      >
      for each vertical line, create two textboxes with the memo field as
      ControlSource. It is important that both have same CanGrow, CanShrink,
      Width and Height properties;
      Drag&drop both to the same place, with just some pixels horizontal
      difference between them;
      The textbox in background, define its backColor and bordercolor to
      black;
      The textbox in foreground, backColor and borderColor = Transparent or
      white;
      Voilà. You have a vertical line, witch widht corresponds to the
      horizontal difference between fore and back textboxes.
      >
      I told you it would be tricky!

      Comment

      • Bob Quintal

        #4
        Re: Auto Extending Verticle Lines

        colemanj4 <colemanj4@gmai l.comwrote in
        news:1180981147 .935588.117680@ w5g2000hsg.goog legroups.com:
        Wow! That works perfectly! Thanks a lot!
        >
        --Jason Coleman
        >
        On Jun 4, 2:16 pm, spier <spie...@yahoo. comwrote:
        >On Jun 4, 11:28 am, colemanj4 <colema...@gmai l.comwrote:
        >>
        Hello,
        >>
        In Report Design View in the Detail Section I have several
        vertical lines that I would like to autoextend with the
        length of the detail section. This is becasue I have a memo
        field that "Can Grow" so that it can fit all the
        information that the users input.
        >>
        If anyone knows how to do this for the lines that would be
        greatly appreciated. Thanks,
        >>
        --Jason Coleman
        >>
        >This will be really tricky:
        >>
        >for each vertical line, create two textboxes with the memo
        >field as ControlSource. It is important that both have same
        >CanGrow, CanShrink, Width and Height properties;
        >Drag&drop both to the same place, with just some pixels
        >horizontal difference between them;
        >The textbox in background, define its backColor and
        >bordercolor to black;
        >The textbox in foreground, backColor and borderColor =
        >Transparent or white;
        >Voilà. You have a vertical line, witch widht corresponds to
        >the horizontal difference between fore and back textboxes.
        >>
        >I told you it would be tricky!
        >
        >
        Please ignore my other post there is an issue in it that I
        forgot about, where sometimes the line gets it size before the
        field that grows. This is correct code to draw 2 vertical lines
        that size based on another control's size

        Private Sub Detail_Print(Ca ncel As Integer, PrintCount As
        Integer)
        Dim x1 As Integer, x2 As Integer
        dim x3 as integer, x4 as integer
        dim y1 As Integer,y2 As Integer
        dim C as long

        x1 = Me.txtcanGrow.L eft
        x2 = Me.txtcanGrow.L eft + Me.txtcanGrow.W idth
        x3 = me.txtanother.l eft
        x4 = me.txtanother.l eft + me.txtanother.w idth

        y1 = Me.txtcanGrow.T op
        y2 = Me.txtcanGrow.T op + Me.txtcanGrow.H eight
        c = RGB(0,0,0)

        Me.Line (x1, y1)-(x1, y2),c
        Me.Line (x2, y1)-(x2, y2),c
        Me.Line (x3, y1)-(x3, y2),c
        Me.Line (x4, y1)-(x4, y2),c

        End Sub

        alternately, the last four lines can become
        Me.Line (x1, y1)-(x2, y2),c, B 'this draws a box.
        Me.Line (x3, y1)-(x4, y2),c, B 'this draws a box.



        --
        Bob Quintal

        PA is y I've altered my email address.

        --
        Posted via a free Usenet account from http://www.teranews.com

        Comment

        • Bob Quintal

          #5
          Re: Auto Extending Verticle Lines

          colemanj4 <colemanj4@gmai l.comwrote in
          news:1180981147 .935588.117680@ w5g2000hsg.goog legroups.com:
          Wow! That works perfectly! Thanks a lot!
          >
          --Jason Coleman
          >
          On Jun 4, 2:16 pm, spier <spie...@yahoo. comwrote:
          >On Jun 4, 11:28 am, colemanj4 <colema...@gmai l.comwrote:
          >>
          Hello,
          >>
          In Report Design View in the Detail Section I have several
          vertical lines that I would like to autoextend with the
          length of the detail section. This is becasue I have a memo
          field that "Can Grow" so that it can fit all the
          information that the users input.
          >>
          If anyone knows how to do this for the lines that would be
          greatly appreciated. Thanks,
          >>
          --Jason Coleman
          >>
          >This will be really tricky:
          >>
          >for each vertical line, create two textboxes with the memo
          >field as ControlSource. It is important that both have same
          >CanGrow, CanShrink, Width and Height properties;
          >Drag&drop both to the same place, with just some pixels
          >horizontal difference between them;
          >The textbox in background, define its backColor and
          >bordercolor to black;
          >The textbox in foreground, backColor and borderColor =
          >Transparent or white;
          >Voilà. You have a vertical line, witch widht corresponds to
          >the horizontal difference between fore and back textboxes.
          >>
          >I told you it would be tricky!
          >
          There is a much simpler way, using a little visual basic code in
          the On_Format event of the section (detail, I presume).

          Just copy the me.ctlMemoThatG rows..height property, to the
          ..height each vertical line that needs to grow.
          Me.Line1.Height = Me.Memo.Height


          --
          Bob Quintal

          PA is y I've altered my email address.

          --
          Posted via a free Usenet account from http://www.teranews.com

          Comment

          Working...