This code:

Public Sub TableView1_ColumnClick(Column As Integer)

      TextBox1.Text = "column = " & Column & " sort = "
      If TableView1.Columns.Sort Then
           TextBox1.Text &= "Asc"
      Else
           TextBox1.Text &= "Desc"
      Endif
End

uses the wrong property.

TableView1.Columns.Sort sets or returns the index of the column that displays 
the sort indicator, not whether any particular column is sorted 
ascending or descending.

Try, "If TableView1.Columns.Ascending Then" instead.


Lee
__________

"Artificial Intelligence is no match for natural stupidity."

On 12/23/2014 12:08 PM, bill-lancaster wrote:
> Thanks for that Lee,
>
> Please see the attached example.  The result of the column_click event does
> not agree with the results of button1_click which reports on the state of
> .Ascending.  In fact after two column_clicks there is no change of state
> with the Ascending property with the column_click event.
>
> Any thoughts?
>
> Gambas 3.5.3
> Kubuntu 14.04 TableviewExample-0.gz
> <http://gambas.8142.n7.nabble.com/file/n49866/TableviewExample-0.gz>
>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to