Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

WebListbox.SelectionChanged does not fire after DeleteAllRows when row(s) are selected before Delete (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Save an Application as a Class?
Next thread: Re: cocoa drawing question


Re: Functions Library   -   Garth Hjelte
  WebListbox.SelectionChanged does not fire after DeleteAllRows when row(s) are selected before Delete   -   Karen

WebListbox.SelectionChanged does not fire after DeleteAllRows when row(s) are selected before Delete
Date: 06.08.11 15:34 (Sat, 06 Aug 2011 10:34:02 -0400)
From: Karen
<feedback://showreport?report_id=17901>

WebListbox.SelectionChanged does not fire after DeleteAllRows when row(s) are selected before Delete
REAL Studio: Framework » Web

In the enclosed project on WebPage1 There is a "data" listbox (Listbox1), lable (label1) and An event logging listbox (EventLog) and a Button.

1) Run the enclosed project.
2) Select a row in the listbox
The label changes to "Selection Change Fired" as expected
A row is added to the EventLog listbox with the same text
This is as expected

3) Press the button
A Single row is added to the Event log saying "DeleteAllRows Pushed"
The label says the same things

The expected behavior is that in deleting all selected rows should set Listindex to -1 and THAT shoudl fire the selection changed event. The selection changed event never fires here even though teh selection changes

Here is the code:

In listbox1.Selection Changed:

Sub SelectionChanged()
Label1.Text = "Selection Change Fired"
EventLog.AddRow "Selection Change Fired"
End Sub

In Button.Action:
Sub Action()
Label1.Text ="DeleteAllRows Pushed"

EventLog.DeleteAllRows
EventLog.AddRow "DeleteAllRows Pushed"

ListBox1.DeleteAllRows

Listbox1.AddRow "1"
Listbox1.AddRow "2"
Listbox1.AddRow "3"
Listbox1.AddRow "4"
Listbox1.AddRow "5"
End Sub

Note: I have not tested SelectionChnaged fires when deleting only a single selected row in a list

Workarounds:
Do WebListbox.ListIndex = -1 before calling WebListbox.DeleteAllRows
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>