[Modules] ListEx (all OS / DPI)
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
Thank you for the tip.
Two questions :
1) What should I do for the vertical cell editing?
2) How can I get header names?
Two questions :
1) What should I do for the vertical cell editing?
2) How can I get header names?
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Update: Tabulator jumps to the next/previous row, if it is the last/first cell
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
doctorized wrote:2) How can I get header names?
Code: Select all
ListEx::GetItemText(#List, ListEx::#Header, Column)
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
Is there a way to resize every column to fit its content (taking in mind both header and rows)?
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Use Flag #FitColumn for AddColumn()doctorized wrote:Is there a way to resize every column to fit its content (taking in mind both header and rows)?
Gesendet von meinem Aquaris X2 mit Tapatalk
Last edited by Thorsten1867 on Sat Aug 03, 2019 4:16 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
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
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Update:
@doctorized
Please try it again.
- Added: attribute '#Padding' for SetAttribute() to change padding if you use #FitColumn
- Bugfixes
Code: Select all
ListEx::SetAttribute(#List, ListEx::#Padding, 5)
Please try it again.
Last edited by Thorsten1867 on Sun Nov 17, 2019 1:35 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
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)
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Padding is the minimum distance between the line and the text.
Gesendet von meinem Aquaris X2 mit Tapatalk
Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
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.pngThorsten1867 wrote:Padding is the minimum distance between the line and the text.
Gesendet von meinem Aquaris X2 mit Tapatalk
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Bugfixes: #FitColumn
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
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)
Last edited by Thorsten1867 on Sun Nov 17, 2019 1:37 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
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")
Last edited by Thorsten1867 on Sun Nov 17, 2019 1:41 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Re: [Modules] ListEx (all OS / DPI)
Good morning! And thank you for updates
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).
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).
PB 6.0x, PureVision User.