Updating text in listbox with radio button click

  1. 3 weeks ago

    michael m

    is not verified Nov 26 Pre-Release Testers, Xojo Pro

    This seems like it should be pretty straightforward, but I am unsure where to put the code to make this happen.
    I have a listbox with a bunch of file names. When I click one of 2 radio buttons I'd like the file names to change, and append some text to the end of the name.

    What event handler would I attach this to?

    action of the radiobutton.

  2. Jean-Yves P

    Nov 26 Pre-Release Testers, Xojo Pro Answer Europe (France, Besançon)

    action of the radiobutton.

  3. Gavin S

    Nov 26 Pre-Release Testers, Xojo Pro UK

    http://docs.xojo.com/RadioButton.Action

    Then you could use http://docs.xojo.com/ListBox.CellValueAt or simply rebuild the whole ListBox.

  4. michael m

    is not verified Nov 26 Pre-Release Testers, Xojo Pro

    @Jean-YvesPochez I tried that but it didn't work.
    @Gavin S ok, CellValueAt is a new one for me. I'll give that a try.

    Just to confirm, does ListBox.Refresh not do anything??

  5. michael m

    is not verified Nov 26 Pre-Release Testers, Xojo Pro

    @Gavin S http://docs.xojo.com/RadioButton.Action

    Then you could use http://docs.xojo.com/ListBox.CellValueAt or simply rebuild the whole ListBox.

    Ok so this appears to be in the new version. We are still on 2018 as we haven't updated all of our apps yet...
    How would I accomplish this in another way?

  6. Gavin S

    Nov 26 Pre-Release Testers, Xojo Pro UK

    @michael m Ok so this appears to be in the new version. We are still on 2018 as we haven't updated all of our apps yet...
    How would I accomplish this in another way?

    https://docs.xojo.com/ListBox.Cell

  7. Jean-Yves P

    Nov 26 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    the action event of the radiobutton send a redraw to the listbox
    the listbox redraws itself based on the radiobutton value.
    or
    the radiobutton action event redraws the listbox based on its value.

or Sign Up to reply!