question about table

32 views
Skip to first unread message

stefano cerbioni

unread,
May 6, 2022, 6:01:54 AMMay 6
to The Ring Programming Language
hi guys  how  is possible give at table  sorting  function for  click in top of column and order the table ?
my code

func tbella(T,Handel,SizeX,SizeY,StRowNumb,aListNameColumn){
if T=1
Table1 = new qTableWidget(Handel) {
resize(SizeX,SizeY)
setrowcount(StRowNumb)
setcolumncount(len(aListNameColumn))
setselectionbehavior(QAbstractItemView_SelectRows)
horizontalScrollbar().setDisabled(false)
setHorizontalScrollBarPolicy(Qt_ScrollBarAlwaysOn)
sortitems(0,0)
for i=1 to len(aListNameColumn)
a=i-1
setHorizontalHeaderItem(a, new QTableWidgetItem(aListNameColumn[i]))
SetRowHeight(a,1)
next
setAlternatingRowColors(true)

}

Mahmoud Fayed

unread,
May 6, 2022, 2:50:10 PMMay 6
to The Ring Programming Language

Bert Mariani

unread,
May 6, 2022, 8:01:22 PMMay 6
to The Ring Programming Language
Hello Stefano

See this example
   AA-Table-17c4-SortOneClassOneWindow.ring

Click on the Top Labels to sort by that column.
Click again to reverse sort

SortTable.png
AA-Table-17c4-SortOneClassOneWindow.ring

Bert Mariani

unread,
May 6, 2022, 8:13:40 PMMay 6
to The Ring Programming Language
Hi Stefano

Attached - AA-Table-17d-......ring

AA-Table-17d-SortOneClassOneWindow.ring

stefano cerbioni

unread,
May 9, 2022, 3:10:56 AMMay 9
to Bert Mariani, The Ring Programming Language
Thanks so much so much so much so much so much
table.setsortingenabled(true)

2022-05-07 2:13 GMT+02:00, Bert Mariani <bert.m...@gmail.com>:
> Hi Stefano
>
> Attached -
> *AA-Table-17d-......ring*
> On Friday, May 6, 2022 at 8:01:22 PM UTC-4 Bert Mariani wrote:
>
>> Hello Stefano
>>
>> See this example
>> * AA-Table-17c4-SortOneClassOneWindow.ring*
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "The Ring Programming Language" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ring-lang/zUCNNdhoSPg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ring-lang+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ring-lang/c3af4d69-4b20-451a-8a0c-25923f7b7b4fn%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages