4 Replies Latest reply on Aug 21, 2007 6:32 AM by Newsgroup_User

    How many will fit without scrolling?

    Level 7
      I have written a custom component, and am trying to figure out a way to
      determine programmatically how many will fit in a section of the screen without
      scrolling. (I.e. at higher screen resolutions, the user will see more of these
      components.) I haven't had much luck.

      The component's measuredHeight and measuredMinHeight are both equal to the
      height of a 'title' label contained in the control. This is determined in the
      component's measure() method. The component is displayed properly when I add
      instances of it to various applications, so I believe the component itself is fine.

      When I try to calculate how many will fit into, say, a VBox, I try to create
      one component, call vbox.addChild(component), and get the component's minHeight
      or measuredMinHeight. With that, and vbox.getStyle("verticalGap"), I should be
      able to determine how many components will fit in the VBox. Unfortunately, at
      this point the component's minHeight and measuredMinHeight are both still 0.

      Any ideas?

      Regards,

      - Adam
        • 1. Re: How many will fit without scrolling?
          Level 7
          Any ideas on this?

          Thanks,

          - Adam

          Adam Fineman wrote:
          > I have written a custom component, and am trying to figure out a way to
          > determine programmatically how many will fit in a section of the screen
          > without scrolling. (I.e. at higher screen resolutions, the user will
          > see more of these components.) I haven't had much luck.
          >
          > The component's measuredHeight and measuredMinHeight are both equal to
          > the height of a 'title' label contained in the control. This is
          > determined in the component's measure() method. The component is
          > displayed properly when I add instances of it to various applications,
          > so I believe the component itself is fine.
          >
          > When I try to calculate how many will fit into, say, a VBox, I try to
          > create one component, call vbox.addChild(component), and get the
          > component's minHeight or measuredMinHeight. With that, and
          > vbox.getStyle("verticalGap"), I should be able to determine how many
          > components will fit in the VBox. Unfortunately, at this point the
          > component's minHeight and measuredMinHeight are both still 0.
          >
          > Any ideas?
          >
          > Regards,
          >
          > - Adam
          • 2. Re: How many will fit without scrolling?
            Level 7
            Anyone?

            Thanks,

            - Adam

            Adam Fineman wrote:
            > Any ideas on this?
            >
            > Thanks,
            >
            > - Adam
            >
            > Adam Fineman wrote:
            >> I have written a custom component, and am trying to figure out a way
            >> to determine programmatically how many will fit in a section of the
            >> screen without scrolling. (I.e. at higher screen resolutions, the
            >> user will see more of these components.) I haven't had much luck.
            >>
            >> The component's measuredHeight and measuredMinHeight are both equal to
            >> the height of a 'title' label contained in the control. This is
            >> determined in the component's measure() method. The component is
            >> displayed properly when I add instances of it to various applications,
            >> so I believe the component itself is fine.
            >>
            >> When I try to calculate how many will fit into, say, a VBox, I try to
            >> create one component, call vbox.addChild(component), and get the
            >> component's minHeight or measuredMinHeight. With that, and
            >> vbox.getStyle("verticalGap"), I should be able to determine how many
            >> components will fit in the VBox. Unfortunately, at this point the
            >> component's minHeight and measuredMinHeight are both still 0.
            >>
            >> Any ideas?
            >>
            >> Regards,
            >>
            >> - Adam
            • 3. Re: How many will fit without scrolling?
              Level 7
              Hello all. I'm still hoping that someone will have a suggestion for me.

              - Adam

              Adam Fineman wrote:
              > Anyone?
              >
              > Thanks,
              >
              > - Adam
              >
              > Adam Fineman wrote:
              >> Any ideas on this?
              >>
              >> Thanks,
              >>
              >> - Adam
              >>
              >> Adam Fineman wrote:
              >>> I have written a custom component, and am trying to figure out a way
              >>> to determine programmatically how many will fit in a section of the
              >>> screen without scrolling. (I.e. at higher screen resolutions, the
              >>> user will see more of these components.) I haven't had much luck.
              >>>
              >>> The component's measuredHeight and measuredMinHeight are both equal
              >>> to the height of a 'title' label contained in the control. This is
              >>> determined in the component's measure() method. The component is
              >>> displayed properly when I add instances of it to various
              >>> applications, so I believe the component itself is fine.
              >>>
              >>> When I try to calculate how many will fit into, say, a VBox, I try to
              >>> create one component, call vbox.addChild(component), and get the
              >>> component's minHeight or measuredMinHeight. With that, and
              >>> vbox.getStyle("verticalGap"), I should be able to determine how many
              >>> components will fit in the VBox. Unfortunately, at this point the
              >>> component's minHeight and measuredMinHeight are both still 0.
              >>>
              >>> Any ideas?
              >>>
              >>> Regards,
              >>>
              >>> - Adam
              • 4. Re: How many will fit without scrolling?
                Level 7
                It's been almost two weeks since I first posted this question, and no one has
                responded. Is there any additional information I can add? There are people
                from Adobe reading and posting in this newsgroup, are there not?

                - Adam

                Adam Fineman wrote:
                > Hello all. I'm still hoping that someone will have a suggestion for me.
                >
                > - Adam
                >
                > Adam Fineman wrote:
                >> Anyone?
                >>
                >> Thanks,
                >>
                >> - Adam
                >>
                >> Adam Fineman wrote:
                >>> Any ideas on this?
                >>>
                >>> Thanks,
                >>>
                >>> - Adam
                >>>
                >>> Adam Fineman wrote:
                >>>> I have written a custom component, and am trying to figure out a way
                >>>> to determine programmatically how many will fit in a section of the
                >>>> screen without scrolling. (I.e. at higher screen resolutions, the
                >>>> user will see more of these components.) I haven't had much luck.
                >>>>
                >>>> The component's measuredHeight and measuredMinHeight are both equal
                >>>> to the height of a 'title' label contained in the control. This is
                >>>> determined in the component's measure() method. The component is
                >>>> displayed properly when I add instances of it to various
                >>>> applications, so I believe the component itself is fine.
                >>>>
                >>>> When I try to calculate how many will fit into, say, a VBox, I try
                >>>> to create one component, call vbox.addChild(component), and get the
                >>>> component's minHeight or measuredMinHeight. With that, and
                >>>> vbox.getStyle("verticalGap"), I should be able to determine how many
                >>>> components will fit in the VBox. Unfortunately, at this point the
                >>>> component's minHeight and measuredMinHeight are both still 0.
                >>>>
                >>>> Any ideas?
                >>>>
                >>>> Regards,
                >>>>
                >>>> - Adam