Loading ...
Sorry, an error occurred while loading the content.

Carto.net ComboBox

Expand Messages
  • dcoggeshall
    I am trying to use the SVG GUI controls provided on Carto.net. Can I build the content for the ComboBox on the fly with a variable number of lines? (unknown in
    Message 1 of 9 , Jan 27, 2009
    • 0 Attachment
      I am trying to use the SVG GUI controls provided on Carto.net.

      Can I build the content for the ComboBox on the fly with a variable
      number of lines? (unknown in advance) ...or must I hard code the
      entries ahead of time?

      Is there a way to set the scroll position to the top of the list or to
      a particular entry?

      Thanks
    • Andreas Neumann
      Hi, You can replace all entries after the Combobox was built. You probably need a few dummy entries to build the combobox though, which you can replace
      Message 2 of 9 , Jan 27, 2009
      • 0 Attachment
        Hi,

        You can replace all entries after the Combobox was built. You
        probably need a few "dummy" entries to build the combobox though,
        which you can replace later.

        You can either replace the property "elementsArray" which can be
        defined like this:

        var flowers = new Array({key:"Acacia",value:false},
        {key:"Acanthus",value:false});

        or you can use the methods:

        - .addElementAtPosition(element,position,fireFunction)
        - .addElementsAlphabetically(elementsArr,direction,fireFunction)

        As to the scroll position: per default it should be on the top. I
        don't see a method to scroll per script to a certain position, but if
        you need this feature it should be easy to add. Tell me if you want
        this.

        Andreas

        --- In svg-developers@yahoogroups.com, "dcoggeshall"
        <dcoggeshall@...> wrote:
        >
        > I am trying to use the SVG GUI controls provided on Carto.net.
        >
        > Can I build the content for the ComboBox on the fly with a variable
        > number of lines? (unknown in advance) ...or must I hard code the
        > entries ahead of time?
        >
        > Is there a way to set the scroll position to the top of the list or
        to
        > a particular entry?
        >
        > Thanks
        >
      • dcoggeshall
        Thanks for the reply, Andreas. I am trying to populate the combo box with a variable length list of GPS points which could run to several hundred. Do I need to
        Message 3 of 9 , Jan 28, 2009
        • 0 Attachment
          Thanks for the reply, Andreas.

          I am trying to populate the combo box with a variable length list of
          GPS points which could run to several hundred. Do I need to initialize
          the elementArrray with the most number of points possible. When I try
          to add to it dynamically, it won't go past the original number of
          items in init.js. I am used to building serialized arrays with a
          constructor function inside a "for" loop. Can this type of array be used?

          Since the contents can be quite extensive, control of the scroll
          position becomes important. When I click on a point on the Google Map,
          I want to scroll the list to the corresponding data line in the
          combobox. Is there a difference between a combobox and a list box?

          David Coggeshall
        • John Delacour
          Hello Andreas, On another topic, I thought you d like to know this: I ve just had a look at using the
          Message 4 of 9 , Jan 29, 2009
          • 0 Attachment
            Hello Andreas,

            On another topic, I thought you'd like to know this:

            I've just had a look at
            <http://www.carto.net/papers/svg/gui/combobox/index.svg> using the
            Mac browsers, Safari 3.2.1, FireFox 3.1b2 and Opera 10 alpha.

            Of these only Opera functions as it should. Safari renders the
            non-US-ASCII characters as raw bytes and the default I-beam cursor
            does not change to arrow over the side lists except with very precise
            positioning. In FireFox the Flowers side-list is completely
            unresponsive, and clicking on any item in the Roses or Flowers boxes
            simply deletes them irretrievably; the Roses box also gives no
            feedback.

            JD
          • Andreas Neumann
            Hi - I will have a look at the problems on the weekend. Expect an answer and/or update of the combobox by Sunday or Monday. Andreas ... initialize ... try ...
            Message 5 of 9 , Jan 29, 2009
            • 0 Attachment
              Hi -

              I will have a look at the problems on the weekend. Expect an answer
              and/or update of the combobox by Sunday or Monday.

              Andreas

              --- In svg-developers@yahoogroups.com, "dcoggeshall"
              <dcoggeshall@...> wrote:
              >
              > Thanks for the reply, Andreas.
              >
              > I am trying to populate the combo box with a variable length list of
              > GPS points which could run to several hundred. Do I need to
              initialize
              > the elementArrray with the most number of points possible. When I
              try
              > to add to it dynamically, it won't go past the original number of
              > items in init.js. I am used to building serialized arrays with a
              > constructor function inside a "for" loop. Can this type of array be
              used?
              >
              > Since the contents can be quite extensive, control of the scroll
              > position becomes important. When I click on a point on the Google
              Map,
              > I want to scroll the list to the corresponding data line in the
              > combobox. Is there a difference between a combobox and a list box?
              >
              > David Coggeshall
              >
            • Andreas Neumann
              yes - I ve seen the problem of the bad rendering of non-ascii characters, but I don t know how to solve it. In my experience this only happened in
              Message 6 of 9 , Jan 29, 2009
              • 0 Attachment
                yes - I've seen the problem of the bad rendering of non-ascii
                characters, but I don't know how to solve it. In my experience this
                only happened in Webkit/Safari. Firefox was fine (at least it renders
                fine on my Linux Firefox 3.0.5 browser)

                The non-responsiveness or weird behavior of some comboboxes in
                Firefox 3.1b2 might well be a bug in Firefox 3.1b2. In Firefox 3.0.5
                it renders fine without problems (tested on Linux). I will do some
                testing on Mac as well on the weekend.

                Andreas

                --- In svg-developers@yahoogroups.com, John Delacour <JD@...> wrote:
                >
                > Hello Andreas,
                >
                > On another topic, I thought you'd like to know this:
                >
                > I've just had a look at
                > <http://www.carto.net/papers/svg/gui/combobox/index.svg> using the
                > Mac browsers, Safari 3.2.1, FireFox 3.1b2 and Opera 10 alpha.
                >
                > Of these only Opera functions as it should. Safari renders the
                > non-US-ASCII characters as raw bytes and the default I-beam cursor
                > does not change to arrow over the side lists except with very
                precise
                > positioning. In FireFox the Flowers side-list is completely
                > unresponsive, and clicking on any item in the Roses or Flowers
                boxes
                > simply deletes them irretrievably; the Roses box also gives no
                > feedback.
                >
                > JD
                >
              • Olaf Schnabel
                for me it renders fine on windows xp sp2 with firefox 3.0.0.5 and opera 9.63. it seems to be a bug in firefox 3.1b2 regards olaf ... -- Dr. Olaf Schnabel
                Message 7 of 9 , Jan 29, 2009
                • 0 Attachment
                  for me it renders fine on windows xp sp2 with firefox 3.0.0.5 and opera
                  9.63. it seems to be a bug in firefox 3.1b2

                  regards
                  olaf

                  Andreas Neumann wrote:
                  > yes - I've seen the problem of the bad rendering of non-ascii
                  > characters, but I don't know how to solve it. In my experience this
                  > only happened in Webkit/Safari. Firefox was fine (at least it renders
                  > fine on my Linux Firefox 3.0.5 browser)
                  >
                  > The non-responsiveness or weird behavior of some comboboxes in
                  > Firefox 3.1b2 might well be a bug in Firefox 3.1b2. In Firefox 3.0.5
                  > it renders fine without problems (tested on Linux). I will do some
                  > testing on Mac as well on the weekend.
                  >
                  > Andreas
                  >
                  > --- In svg-developers@yahoogroups.com, John Delacour <JD@...> wrote:
                  >> Hello Andreas,
                  >>
                  >> On another topic, I thought you'd like to know this:
                  >>
                  >> I've just had a look at
                  >> <http://www.carto.net/papers/svg/gui/combobox/index.svg> using the
                  >> Mac browsers, Safari 3.2.1, FireFox 3.1b2 and Opera 10 alpha.
                  >>
                  >> Of these only Opera functions as it should. Safari renders the
                  >> non-US-ASCII characters as raw bytes and the default I-beam cursor
                  >> does not change to arrow over the side lists except with very
                  > precise
                  >> positioning. In FireFox the Flowers side-list is completely
                  >> unresponsive, and clicking on any item in the Roses or Flowers
                  > boxes
                  >> simply deletes them irretrievably; the Roses box also gives no
                  >> feedback.
                  >>
                  >> JD
                  >>
                  >
                  >
                  >

                  --
                  Dr. Olaf Schnabel
                  Institute of Cartography
                  ETH Zurich
                  Wolfgang-Pauli-Str. 15
                  8093 Zurich
                  Switzerland

                  tel: ++41 44 633 3031
                  fax: ++41 44 633 1153
                  e-mail: oschnabel@...
                  www private: http://www.ika.ethz.ch/schnabel
                  www project: http://www.e-cartouche.ch
                  www institute: http://www.karto.ethz.ch
                • dcoggeshall
                  Hello Andreas, I have padded the elementArray to allow for a maximum number of entries (2000). The main need now is to be able to control the ComboBox Scroll
                  Message 8 of 9 , Feb 2 9:39 AM
                  • 0 Attachment
                    Hello Andreas,

                    I have padded the elementArray to allow for a maximum number of
                    entries (2000).

                    The main need now is to be able to control the ComboBox Scroll
                    position from Javascript.

                    Thanks,

                    David Coggeshall
                    SFC MapLab Project
                    415 387-8760

                    --- In svg-developers@yahoogroups.com, "dcoggeshall" <dcoggeshall@...>
                    wrote:
                    >
                    > I am trying to use the SVG GUI controls provided on Carto.net.
                    >
                    > Can I build the content for the ComboBox on the fly with a variable
                    > number of lines? (unknown in advance) ...or must I hard code the
                    > entries ahead of time?
                    >
                    > Is there a way to set the scroll position to the top of the list or to
                    > a particular entry?
                    >
                    > Thanks
                    >
                  • dcoggeshall
                    Hello Andreas, I am still hoping to hear a response for the ability to control the scroll position in a ComboBox. Do you think that is possible? David C.
                    Message 9 of 9 , Feb 7 9:38 AM
                    • 0 Attachment
                      Hello Andreas,

                      I am still hoping to hear a response for the ability to control the
                      scroll position in a ComboBox. Do you think that is possible?

                      David C.

                      --- In svg-developers@yahoogroups.com, "dcoggeshall" <dcoggeshall@...>
                      wrote:
                      >
                      > Hello Andreas,
                      >
                      > I have padded the elementArray to allow for a maximum number of
                      > entries (2000).
                      >
                      > The main need now is to be able to control the ComboBox Scroll
                      > position from Javascript.
                      >
                      > Thanks,
                      >
                      > David Coggeshall
                      > SFC MapLab Project
                      > 415 387-8760
                      >
                      > --- In svg-developers@yahoogroups.com, "dcoggeshall" <dcoggeshall@>
                      > wrote:
                      > >
                      > > I am trying to use the SVG GUI controls provided on Carto.net.
                      > >
                      > > Can I build the content for the ComboBox on the fly with a variable
                      > > number of lines? (unknown in advance) ...or must I hard code the
                      > > entries ahead of time?
                      > >
                      > > Is there a way to set the scroll position to the top of the list or to
                      > > a particular entry?
                      > >
                      > > Thanks
                      > >
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.