[Modules] ListEx (all OS / DPI)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
ruslanx
User
User
Posts: 32
Joined: Mon Jun 06, 2011 8:28 am

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

Post by ruslanx »

Thorsten1867 wrote:I am currently building my own ScrollBar into ListEx, then I could send a corresponding event.
cool lib .. custom ScrollBar -> custom color -> full custom theme ... :wink:
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

Right, appearance and color can then be adjusted.

Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

Update:
  • ScrollBarGadget() replaced by drawing routine
  • Attribute #ScrollBar [#ScrollBar_Default/#ScrollBar_Frame/#ScrollBar_DragPoint]
  • SetColor() -> [#ScrollBar_FrontColor/#ScrollBar_BackColor/#ScrollBar_BorderColor/#ScrollBar_ButtonColor/#ScrollBar_ThumbColor]
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
davido
Addict
Addict
Posts: 1829
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

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

Post by davido »

@Thorsten1867,
Thank you for looking at my problem with images.
Eventually I discovered that I had been using the flag Listindex::#Image inappropriately. The odd thing was that all other versions seemed to accept my error but the later version did not!
Could you inform me of the purpose of this flag?

I have been looking at the new version which appeared at first to be fine, however, there appears to be a problem in OSX. Dragging the 'drag-bar' down is ok. It will not drag up again. This is but a minor problem as the mouse works perfectly.
I also noticed that clicking the 'drag-bar' produces an event: the last chosen row! If no row has been chosen clicking the 'drag-bar' produces the error below:

#Version = 20030500
[19:40:31] Executable started.
[19:40:41] [ERROR] ListExModule.pbi (Line: 8813)
[19:40:41] [ERROR] SelectElement(): SelectElement(): index value can not be negative.
[19:40:51] The Program was killed.
DE AA EB
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

#Image is an internal flag. It told the drawing routine, there is a valid ImageID to display a image in this cell.

Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

davido wrote:I also noticed that clicking the 'drag-bar' produces an event: the last chosen row!
The Scrollbar produce only the event #EventType_ScrollBar if the position is changed.
The EventData() are #ScrollBar_Up / #ScrollBar_Down / #ScrollBar_Left / #ScrollBar_Right
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
loulou2522
Enthusiast
Enthusiast
Posts: 358
Joined: Tue Oct 14, 2014 12:09 pm

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

Post by loulou2522 »

Hi Thorsten,
How can i deselect all row in listex ? or only for one column
Thanks in advance
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

loulou2522 wrote:How can i deselect all row in listex ? or only for one column

Code: Select all

ListEx::SelectItems(#List, ListEx::#None)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
loulou2522
Enthusiast
Enthusiast
Posts: 358
Joined: Tue Oct 14, 2014 12:09 pm

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

Post by loulou2522 »

Thanks for your answering
But i encount another problem linked with my question
When I put the focus on an editable column in numerical format, when I don't enter any data and then I want to deselect the line nothing happens and the focus remains on the column.
1/]Instruction use

Code: Select all

ListEx::AddItem(#List, ListEx::#LastItem, initial)
            ListEx::SetItemImage(#List, listex::CountItems(#list, #False)-1, 7, #Image, ListEx::#Center, 14, 14) 
            ListEx::SetState(#List,listex::CountItems(#list, #False)-1 ,4)
         
And after for deselecting without entering any data

Code: Select all

ListEx::SelectItems(#List, ListEx::#None)
The focus stay on
ListEx::SetState(#List,listex::CountItems(#list, #False)-1 ,4)
2/ After having given the focus to a cell to be able to enter data I am obliged to click with the mouse on the selected cell otherwise the data input is blocked. I thought that giving focus to a cell would allow you to enter data into it ? Is this the case or is it a limitation of the program?
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

Update: Bugfixes

@loulou2522
Try it again.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
loulou2522
Enthusiast
Enthusiast
Posts: 358
Joined: Tue Oct 14, 2014 12:09 pm

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

Post by loulou2522 »

Thanks it's work perfectly.
Have a nice week-end
User avatar
mrv2k
User
User
Posts: 47
Joined: Fri Jan 20, 2012 3:40 pm
Location: SE England
Contact:

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

Post by mrv2k »

Hi Thorsten

Just tried your updated list gadget with the new scroll bars and there's a couple of problems...

1. There is no minimum size on the slider button so when you have a couple of thousand rows, the button disappears as it is too small.
2. You can only scroll the list if your mouse is over the scroll bar. The old version would still scroll if your mouse button was down and the cursor was inside or outside the scrollbar gadget.

P.S. Thanks for fixing the TreeEx problem!
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

Update: Minimum thumb size & lazy scrolling
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]
loulou2522
Enthusiast
Enthusiast
Posts: 358
Joined: Tue Oct 14, 2014 12:09 pm

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

Post by loulou2522 »

Hi, Thorsten.
I have a problem with an area

Code: Select all

ListEx::AddColumn(#List, ListEx::#LastItem, "LIBELLE", 200, "Libelle", ListEx::#Text|ListEx::#Editable) ListEx::SetColumnAttribute(#list,5,ListEx::#MaxChars,140)
When I type and I reach the end of the display the cursor does not move and I do not see what I am typing, in fact the scroll is not done and when I validate my input the text overflows to the next field. Is it possible to avoid this overflow?
User avatar
Thorsten1867
Addict
Addict
Posts: 1265
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

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

Post by Thorsten1867 »

Do you use Windows or MacOS?
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

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