It is currently Sat Oct 31, 2020 8:08 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 438 posts ]  Go to page Previous  1 ... 26, 27, 28, 29, 30  Next
Author Message
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Tue Mar 31, 2020 4:37 pm 
Offline
User
User
User avatar

Joined: Fri Jun 07, 2019 1:56 pm
Posts: 77
Thorsten1867 wrote:
I tested it again and uploaded it.


Hi Thorsten,

WELL DONE, thanks a lot.

Rainer


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Mon Apr 06, 2020 8:42 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1786
Location: Uttoxeter, UK
@Thorsten1867,

I have found what appears to be a bug in version 20033101.
I have been able to reproduce the bug in the demo code you supply with the ListEx:

If you change the width of the column from 60 to 80 in line 10292 and then 'run' - two problems appear:

As expected a horizontal scroll-bar is drawn.
1. This scroll-bar partially hides row 10
2. Rows 9 and 10 no longer respond to left-clicks to highlight the clicked row or events.

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Apr 26, 2020 9:20 am 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Hi Thorsten

Thanks for all the updates. The gadget is almost perfect.

Any chance that you can get the gadget to automaticlly scroll if you are using the keyboard and you reach the bottom row of the screen? The standard gadget does this.

Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Apr 26, 2020 10:04 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
The cursor keys work for me?!?

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun Apr 26, 2020 4:14 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Strange... Must have had an old version. Downloaded again and it works fine.

Thanks for the answer though.

Keep up the good work!


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Mon Apr 27, 2020 12:19 am 
Offline
User
User

Joined: Sun Dec 28, 2014 1:12 pm
Posts: 17
Hi Thorsten.
Thanks for the powerful gadget.

SetItemColor for the "test" column number 5 does not work, but it does if you select column number 6.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sat May 16, 2020 4:43 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Hi Thorsten

Any chance of adding an minimum size to the scrollbar slider as i gets really small when showing a long list...

https://imgur.com/eXNPIkU

Thanks

Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Sun May 17, 2020 2:28 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Fixed it!

Changed...

Code:
If ListEx()\ScrollBar\Item()\Thumb\Size < dpiY(6) : ListEx()\ScrollBar\Item()\Thumb\Size = dpiY(6) : EndIf


to

Code:
If ListEx()\ScrollBar\Item()\Thumb\Size < dpiY(20) : ListEx()\ScrollBar\Item()\Thumb\Size = dpiY(20) : EndIf


in the procedure CalcScrollBarThumb_

Regards

Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Mon May 18, 2020 12:16 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
I'm trying to use the ListEx gadget in a splitter gadget. If I run this code, there seems to be a problem with the auto resize. Am I doing something wrong?

Code:
IncludeFile "ListEx\ListExModule.pbi"
IncludeFile "TreeEx\TreeExModule.pbi"

OpenWindow(0,0,0,1280,720,"Test",#PB_Window_ScreenCentered!#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget)
TreeEx::Gadget(1,0,0,0,0,"Tree",TreeEx::#AutoResize, 0)
ListEx::Gadget(2,0,0,0,0,"Test 1",1,"",ListEx::#GridLines|ListEx::#AutoResize, 0)
SplitterGadget(3,0,0,WindowWidth(0),WindowHeight(0)-MenuHeight(),1,2,#PB_Splitter_Vertical|#PB_Splitter_Separator)
SetGadgetAttribute(3,#PB_Splitter_FirstMinimumSize,250) 
SetGadgetState(3,250)
ListEx::SetAutoResizeFlags(2, ListEx::#Height|ListEx::#Width)
ListEx::SetColumnAttribute(2,0,ListEx::#ColumnWidth,600)
ListEx::AddColumn(2,1,"Test 2",260)
ListEx::AddColumn(2,2,"Test 3",82)
ListEx::SetHeaderAttribute(2, ListEx::#Align, ListEx::#Center,2)
ListEx::SetColumnAttribute(2, 2, ListEx::#Align, ListEx::#Center)

ListEx::DisableRedraw(2,#True)

For i=1  To 1000
  ListEx::AddItem(2,ListEx::#LastItem,"Column 1" + #LF$ + "Column 2" + #LF$ + "Column 3")
Next

ListEx::DisableRedraw(2,#False)

Repeat
 
  event=WaitWindowEvent()
       
Until event=#PB_Event_CloseWindow


Regards

Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Tue May 19, 2020 10:41 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update:
  • Attribut '#ParentGadget' for resizing (e.g. ContainerGadget)
  • Attribut '#MinimumSize' for minimum size of scrollbar thumb

@mrv2k
Please try!

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Tue May 19, 2020 10:44 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Changed

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Tue May 19, 2020 3:45 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
I think its a DPI issue. My display is normally set to 125% scaling. If I turn scaling to 100%, the header and column problems go away.

If I run this code at 100% scaling, the gadgets are perfect.

Code:
IncludeFile "ListEx\ListExModule.pbi"
IncludeFile "TreeEx\TreeExModule.pbi"

OpenWindow(0,0,0,1280,920,"Test",#PB_Window_ScreenCentered!#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget)
TreeEx::Gadget(1,0,0,0,0,"Tree",TreeEx::#AutoResize, 0)
ListEx::Gadget(2,0,0,0,0,"Test 1",1,"",ListEx::#GridLines|ListEx::#AutoResize, 0)
SplitterGadget(3,0,0,WindowWidth(0),WindowHeight(0)-MenuHeight()-200,1,2,#PB_Splitter_Vertical|#PB_Splitter_Separator)
SetGadgetAttribute(3,#PB_Splitter_FirstMinimumSize,250)
SetGadgetState(3,250)

ListEx::SetAutoResizeFlags(2, ListEx::#Height|ListEx::#Width)
ListEx::SetAttribute(2,ListEx::#ParentGadget, 3)
ListEx::SetAttribute(2,ListEx::#MinimumSize, 20)
ListEx::SetAutoResizeColumn(2,1)
ListEx::SetColumnAttribute(2,0,ListEx::#ColumnWidth,GadgetWidth(3)-257-342) ; 257 =250+7 For Splitter | 342 = 260+82 For Columns
ListEx::AddColumn(2,1,"Test 2",260)
ListEx::AddColumn(2,2,"Test 3",82)


ListEx::Gadget(4,0,WindowHeight(0)-205,WindowWidth(0),180,"Test 1",WindowWidth(0)-342,"",ListEx::#GridLines|ListEx::#AutoResize, 0)
ListEx::SetAutoResizeFlags(4, ListEx::#Height|ListEx::#Width) 
ListEx::SetAutoResizeColumn(4,1)
ListEx::SetAttribute(4,ListEx::#MinimumSize, 20)
ListEx::AddColumn(4,1,"Test 2",260)
ListEx::AddColumn(4,2,"Test 3",82)

ListEx::DisableRedraw(2,#True)
ListEx::DisableRedraw(4,#True)

For i=1  To 10000
  ListEx::AddItem(2,ListEx::#LastItem,"Column 1" + #LF$ + "Column 2" + #LF$ + "Column 3")
  ListEx::AddItem(4,ListEx::#LastItem,"Column 1" + #LF$ + "Column 2" + #LF$ + "Column 3")
Next

ListEx::DisableRedraw(2,#False)
ListEx::DisableRedraw(4,#False)

Repeat
 
  event=WaitWindowEvent()
       
Until event=#PB_Event_CloseWindow


If I set it to anything over 100%, the header bar becomes extended and the columns sizes break. It also breaks SetAutoResizeColumn.

I can probably get around the splittergadget problem by intercepting the resize event and doing a bit of math to calculate the first column width. The #ParentGadget is great, but splitter gadgets are dynamic and you would need to know the dimensions of which ever side the ListEx is in. This might be possible by getting the ListEx GadgetWidth() after the splitter is drawn as it automatically resizes each gadget.

#MinimumSize - Works Great!

Thanks for all you help!

Paul

P.S. Theres a typo on line 7491. It reads...

Code:
If ListEx()\ParentNum <> #PB_Default


It should be

Code:
If ListEx()\Parent\Num <> #PB_Default


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Thu May 21, 2020 9:19 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Bugfixes (DPI)

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Thu May 21, 2020 5:04 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Thanks Thorsten!

Works absolutely perfectly now!

Only had to comment out a debug.

Great Work!

Regards

Paul


Top
 Profile  
Reply with quote  
 Post subject: Re: [Modules] ListEx (all OS / DPI)
PostPosted: Thu May 21, 2020 6:20 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 45
Location: SE England
Sorry Me Again!

Looks like something broke on the scroll bars with the new update. The scrollbar button scrolls at a different speed to the mouse. It does it on the example if you add a few more lines. I checked on different DPI's and it's not related.

Regards

Paul


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 438 posts ]  Go to page Previous  1 ... 26, 27, 28, 29, 30  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 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