It is currently Sun Feb 23, 2020 5:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 340 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 23  Next
Author Message
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Fri Jul 26, 2019 2:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
Thank you for the tip.
Two questions :
1) What should I do for the vertical cell editing?
2) How can I get header names?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Fri Jul 26, 2019 3:16 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Update: Tabulator jumps to the next/previous row, if it is the last/first cell

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Fri Jul 26, 2019 3:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
doctorized wrote:
2) How can I get header names?


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

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat Aug 03, 2019 6:40 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
Is there a way to resize every column to fit its content (taking in mind both header and rows)?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat Aug 03, 2019 9:31 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
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

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Sat Aug 03, 2019 4:16 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat Aug 03, 2019 12:24 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
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:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat Aug 03, 2019 3:41 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Update:
  • Added: attribute '#Padding' for SetAttribute() to change padding if you use #FitColumn
  • Bugfixes
Code:
ListEx::SetAttribute(#List, ListEx::#Padding, 5)

@doctorized
Please try it again.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Sun Nov 17, 2019 1:35 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Aug 04, 2019 12:19 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
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:
ListEx::SetAttribute(#adv_lst_students, ListEx::#Padding, 50)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Aug 04, 2019 4:03 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Padding is the minimum distance between the line and the text.

Gesendet von meinem Aquaris X2 mit Tapatalk

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Aug 04, 2019 6:17 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Aug 04, 2019 9:59 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Bugfixes: #FitColumn

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Mon Aug 05, 2019 9:08 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
Danke!


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat Aug 17, 2019 1:14 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Update:
  • Changed: SetItemImage() => ImageID -> Image
  • Added: Cursor keys / PageUp & PageDown / Strg + Pos1 & Strg + End
Code:
ListEx::SetItemImage(#List.i, 3, 2, 16, 16, #Image, ListEx::#Center)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Sun Nov 17, 2019 1:37 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Aug 18, 2019 8:20 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1112
Location: Germany
Update:
  • Added: SelectItems()
  • Added: GetRowFromLabel()
  • Bugfixes
Code:
ListEx::SelectItems(#List, ListEx::#All)
ListEx::SelectItems(#List, ListEx::#None)

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

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Sun Nov 17, 2019 1:41 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Mon Aug 19, 2019 8:06 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 717
Location: Spain
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

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 340 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 23  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: nerk64 and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye