[Modules] ListEx (all OS / DPI)
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Bug fixed
Please try it again.
Please try it again.
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] Editable and sortable ListGadget (all OS / DPI
It works fine now! No more rows()\numberThorsten1867 wrote:Bug fixed
Please try it again.
Thank you again.
PB 6.0x, PureVision User.
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Another request if is possible
In the following example, I activate the 4th row of the list, make a ClearItems() and call GetState(), which follows with the value 4.
Is possible reset Getstate() value to 0 after a call to ClearItems() ?
For now I added ListEx()\Row\Focus = -1 in Procedure ClearItems(gNum.i) and it seem works fine
PS: I owe you a dozen beers!
In the following example, I activate the 4th row of the list, make a ClearItems() and call GetState(), which follows with the value 4.
Is possible reset Getstate() value to 0 after a call to ClearItems() ?
Code: Select all
If OpenWindow(0, 0, 0, 500, 200, "Window", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
ListEx::Gadget(1, 10, 10, 400, 70, "header1", 125, "", ListEx::#GridLines)
For c = 1 To 10
ListEx::AddItem(1, ListEx::#LastItem, "Randy Rhoads")
Next
ListEx::SetState(1, 4)
ListEx::ClearItems(1)
Debug ListEx::getState(1)
Repeat: Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
CompilerEndIf
PS: I owe you a dozen beers!
PB 6.0x, PureVision User.
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Bug fixed
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]
-
- User
- Posts: 71
- Joined: Thu May 02, 2019 3:57 am
- Location: USA
- Contact:
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Thank you for ListEx.
Is it possible to resize a column based on the content's width? If so, can you offer sample code?
Thank you,
Robert
Is it possible to resize a column based on the content's width? If so, can you offer sample code?
Thank you,
Robert
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Update:
- Align & font for individual columns of header row
- SetHeaderHeight() added
- SetFont() & SetColor() for individual columns
- SetFont() extended by type parameters (#HeaderFont/#StringFont/#GadgetFont)
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] Editable and sortable ListGadget (all OS / DPI
Update: Added: new flag #FitColumn for AddColumn()RobertRioja wrote:Is it possible to resize a column based on the content's width? If so, can you offer sample code?
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] Editable and sortable ListGadget (all OS / DPI
Update: CloseEdit() - closes all cells that are open for editing (StringGadget / ComboBox / DateGadget) and saves the changes.
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: individual colors for the columns of the header line
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)
Your code is a hell of a job! Congratulations!
I would like one thing, if it can be done. Is there a way to add a shortcut for keyboard Enter key and when the user double clicks an editable cell, enters a value and presses Enter key, to be able to go to the next cell in the column without having double clicking that cell?
I would like one thing, if it can be done. Is there a way to add a shortcut for keyboard Enter key and when the user double clicks an editable cell, enters a value and presses Enter key, to be able to go to the next cell in the column without having double clicking that cell?
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Have you ever tried the tab key?doctorized wrote: .... when the user double clicks an editable cell, enters a value and presses Enter key, to be able to go to the next cell in the column without having double clicking that 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]
- doctorized
- Addict
- Posts: 856
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
I tried it now and the cell just lost editing focus. Nothing more.Thorsten1867 wrote:Have you ever tried the tab key?
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
I just re-tested it.
I double click in the column "Edit", change the name and press the tab key.
Then the ComboBox will be opened automatically for editing.
(Windows 10 / PB 5.71)
I double click in the column "Edit", change the name and press the tab key.
Then the ComboBox will be opened automatically for editing.
(Windows 10 / PB 5.71)
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)
Oh, now I see. If you have two or more editable columns, with Tab key you go through them horizontally. In my case, only one editable column exists and I want to move vertically.Thorsten1867 wrote:I just re-tested it.
I double click in the column "Edit", change the name and press the tab key.
Then the ComboBox will be opened automatically for editing.
(Windows 10 / PB 5.71)
Also, a small addition useful to me:
Code: Select all
Declare.i CountColumns(GNum.i)
Procedure.i CountColumns(GNum.i)
If FindMapElement(ListEx(), Str(GNum))
ProcedureReturn ListEx()\Col\Number
EndIf
EndProcedure
- Thorsten1867
- Addict
- Posts: 1366
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Try:
Code: Select all
ListEx::GetAttribute(#List, ListEx::#ColumnCount)
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]