Page 8 of 33

Re: [Modules] ListEx (all OS / DPI)

Posted: Fri Jul 26, 2019 2:55 pm
by doctorized
Thank you for the tip.
Two questions :
1) What should I do for the vertical cell editing?
2) How can I get header names?

Re: [Modules] ListEx (all OS / DPI)

Posted: Fri Jul 26, 2019 3:16 pm
by Thorsten1867
Update: Tabulator jumps to the next/previous row, if it is the last/first cell

Re: [Modules] ListEx (all OS / DPI)

Posted: Fri Jul 26, 2019 3:19 pm
by Thorsten1867
doctorized wrote:2) How can I get header names?

Code: Select all

ListEx::GetItemText(#List, ListEx::#Header, Column)

Re: [Modules] ListEx (all OS / DPI)

Posted: Sat Aug 03, 2019 6:40 am
by doctorized
Is there a way to resize every column to fit its content (taking in mind both header and rows)?

Re: [Modules] ListEx (all OS / DPI)

Posted: Sat Aug 03, 2019 9:31 am
by Thorsten1867
doctorized wrote:Is there a way to resize every column to fit its content (taking in mind both header and rows)?
Use Flag #FitColumn for AddColumn()

Gesendet von meinem Aquaris X2 mit Tapatalk

Re: [Modules] ListEx (all OS / DPI)

Posted: Sat Aug 03, 2019 12:24 pm
by doctorized
If you check this image: http://users.sch.gr/arahiotis/other/ListEx.png, you will see that colors are not drawn corectly. Also, the last column (and maybe all of them) has a width a little smaller than it should. My code to create it is this:

Code: Select all

cols.a = ListEx::GetAttribute(#adv_lst_students,ListEx::#ColumnCount)
For i = 1 To cols
	ListEx::RemoveColumn(#adv_lst_students,0)
Next
txt$ = LCase(GetGadgetText(#adv_edtr))
If FindString(txt$,"select")
	CheckDatabaseQuery(#db, txt$)
Else
	CheckDatabaseUpdate(#db, txt$)
EndIf
txt$ = ""
cols = DatabaseColumns(#db) - 1
For ii = 0 To cols
	ListEx::AddColumn(#adv_lst_students,ii,DatabaseColumnName(#db,ii),80,"",ListEx::#FitColumn)
Next
While NextDatabaseRow(#db)
	For ii = 0 To cols
		txt$ + GetDatabaseString(#db, ii) + #LF$ 
	Next
	ListEx::AddItem(#adv_lst_students,-1,txt$) 
	txt$ = ""
Wend

Re: [Modules] ListEx (all OS / DPI)

Posted: Sat Aug 03, 2019 3:41 pm
by Thorsten1867
Update:
  • Added: attribute '#Padding' for SetAttribute() to change padding if you use #FitColumn
  • Bugfixes

Code: Select all

ListEx::SetAttribute(#List, ListEx::#Padding, 5)
@doctorized
Please try it again.

Re: [Modules] ListEx (all OS / DPI)

Posted: Sun Aug 04, 2019 12:19 pm
by doctorized
Thanks for the update but how and where should I use this attribute? If I use it right after creating the gadget, then if value is, for example 50, then columns have a larger same width than they should have. If I use it after the code I posted, nothing happens. The code:

Code: Select all

ListEx::SetAttribute(#adv_lst_students, ListEx::#Padding, 50)

Re: [Modules] ListEx (all OS / DPI)

Posted: Sun Aug 04, 2019 4:03 pm
by Thorsten1867
Padding is the minimum distance between the line and the text.

Gesendet von meinem Aquaris X2 mit Tapatalk

Re: [Modules] ListEx (all OS / DPI)

Posted: Sun Aug 04, 2019 6:17 pm
by doctorized
Thorsten1867 wrote:Padding is the minimum distance between the line and the text.

Gesendet von meinem Aquaris X2 mit Tapatalk
Yes, I know that. I thought that it fixed the color issue with some way. The colors are now as in the image: http://users.sch.gr/arahiotis/other/List2.png

Re: [Modules] ListEx (all OS / DPI)

Posted: Sun Aug 04, 2019 9:59 pm
by Thorsten1867
Bugfixes: #FitColumn

Re: [Modules] ListEx (all OS / DPI)

Posted: Mon Aug 05, 2019 9:08 am
by doctorized
Danke!

Re: [Modules] ListEx (all OS / DPI)

Posted: Sat Aug 17, 2019 1:14 pm
by Thorsten1867
Update:
  • Changed: SetItemImage() => ImageID -> Image
  • Added: Cursor keys / PageUp & PageDown / Strg + Pos1 & Strg + End

Code: Select all

ListEx::SetItemImage(#List.i, 3, 2, 16, 16, #Image, ListEx::#Center)

Re: [Modules] ListEx (all OS / DPI)

Posted: Sun Aug 18, 2019 8:20 pm
by Thorsten1867
Update:
  • Added: SelectItems()
  • Added: GetRowFromLabel()
  • Bugfixes

Code: Select all

ListEx::SelectItems(#List, ListEx::#All)
ListEx::SelectItems(#List, ListEx::#None)

Row.i = ListEx::GetRowFromLabel(#List, "Item 2")

Re: [Modules] ListEx (all OS / DPI)

Posted: Mon Aug 19, 2019 8:06 am
by zikitrake
Good morning! And thank you for updates :D

There seems to be a small bug with the mouse scroll button when resizing the gadget.

With the vertical bar activated everything works correctly, but when resizing the gadget, this bar disappears (as it should be) but the scroll button of the mouse continues scrolling the list (although it already appears full on the screen).

Image