It is currently Sun Sep 22, 2019 9:06 am

All times are UTC + 1 hour




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

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 896
Location: Germany
Try:
Code:
ListEx::GetAttribute(#List, ListEx::#ColumnCount)

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

Download of PureBasic - Modules (GitHub)

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


Top
 Profile  
Reply with quote  
 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: 719
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: 896
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 (GitHub)

[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: 896
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 (GitHub)

[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: 719
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: 896
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 (GitHub)

[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: 719
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: 896
Location: Germany
Update:
  • Added: attribute '#Padding' for SetAttribute() to change padding if you use #FitColumn
  • Bugfixes

@doctorized
Please try it again.

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

Download of PureBasic - Modules (GitHub)

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


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: 719
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: 896
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 (GitHub)

[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: 719
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: 896
Location: Germany
Bugfixes: #FitColumn

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

Download of PureBasic - Modules (GitHub)

[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: 719
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: 896
Location: Germany
Update:
  • Changed: SetItemImage() => ImageID -> Image
  • Added: Cursor keys / PageUp & PageDown / Strg + Pos1 & Strg + End

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

Download of PureBasic - Modules (GitHub)

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


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: 896
Location: Germany
Update:
  • Added: SelectItems()
  • Added: GetRowFromLabel()
  • Bugfixes

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

Download of PureBasic - Modules (GitHub)

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


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


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