Can't set webPopupMenu value in code if value not shown

  1. 4 months ago

    Dean D

    Mar 12 Santa Ynez California

    I have a webPopupMenu that has one column with number 1 -12. In my browser, it shows the selected value until I select the control, then values 1-6 show on the screen and I can scroll down to see the others. When I try to set the value with a program (webpopup.CellSelected(r,0) = true), it works as long as r is 1-6. If r is > 6, nothing shows. I tried webpopup.Text = "7" and webpopup.Listindex = r and got the same result. They work when r < 7. I can rewrite the action event of the popupmenu as a method and call it with the needed value, but that doesn't help getting the screen to look right. Any suggestions for a work around?

    I tried adding more rows and also deleting all rows and reloading all 12 rows. Without any change.

    Changing the program so that it no longer forces a download of the pdf now shows the pdf without showing the main screen. The problem is no longer an issue for me. Problem not solved, but gone away.

  2. Tim P

    Mar 12 Pre-Release Testers, XDC Speakers

    Popup menus do not have multiple columns, cells, or a property for CellSelected; so I'm kind of confused.
    Are you confusing WebPopupMenu with a WebListbox by chance?
    Or are you using some kind of 3rd party control?

    Here's the documentation for WebPopupMenu, maybe it'll help you:
    http://docs.xojo.com/index.php/WebPopupMenu

  3. Greg O

    Mar 12 Xojo Inc Somewhere near Raleigh, NC

    Try ListIndex.

  4. Dean D

    Mar 14 Santa Ynez California

    Sorry. I was tired and fighting a nasty cold when I wrote the post. In my confused state, I associated the encl.Mid(5,2) with a RadioGroup.CellSelected value and included it in my description of the problem. Perhaps the best way to explain it is with the actual example at:
    https://www.ezmeter.net/cgi-bin/catalog/metercatalog.cgi?mod=D3131/3&encl=82326
    This page allows users to get the model number for an electric watthour meter by choosing different parameters. The program also lets them download a spec sheet for the model they have selected. My current project is to process a URL with GET parameters so our sales staff can email a link to a spec sheet that will be generated on the fly. The link provided above specifies an enclosure (near the bottom of the page in the center) with six meters enclosed. Change the 6 at the end of URL to an 8 and the quantity goes away. This happens with any quantity entered above the values that show in the popup menu without scrolling down. I have tried setting the value with both .listindex = 7 and .Text = "8" and get the same result.

  5. Greg O

    Mar 14 Xojo Inc Somewhere near Raleigh, NC

    yeah, the problem is that when the page first loads, there are only 6 items in the menu. You can't select ListIndex 7 if there's only indexes 0-5 in the menu.

  6. Dean D

    Mar 15 Santa Ynez California

    Is there a way to programatically add more items to the menu?

  7. Albin K

    Mar 15 Europe (Sweden)

    @Dean D Is there a way to programatically add more items to the menu?

    list.addrow(“hej”)
  8. Dean D

    Mar 15 Answer Santa Ynez California
    Edited 4 months ago

    I tried adding more rows and also deleting all rows and reloading all 12 rows. Without any change.

    Changing the program so that it no longer forces a download of the pdf now shows the pdf without showing the main screen. The problem is no longer an issue for me. Problem not solved, but gone away.

or Sign Up to reply!