Page 5 of 33
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Thu May 09, 2019 5:54 pm
by Ajm
Thank you Thorsten1867.
Regards
Andy
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Fri May 10, 2019 3:56 pm
by Lord
Hi!
You incorporated some gadgets (button, date, combo) in the list.
Is it also possible to include a progressbargadget in the same way?
This would be a nice enhancement.

Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sat May 11, 2019 10:12 am
by Thorsten1867
It should be possible, but I haven't found a sensible application for it yet.
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sat May 11, 2019 10:32 am
by Lord
Thorsten1867 wrote:It should be possible, but I haven't found a sensible application for it yet.
Something like this (part of some type of a downloader):

This is just an example. I would prefer a smaller column size.
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 7:53 am
by zikitrake
Thank you for this module. I think this is the first time I feel comfortable using a different grid alternative than Listicon (there are several similar examples but I don't find them so easy to use).
If possible, I would like to see two options implemented:
1) When click Right mouse button, select the row where the cursor is (As in a ListIcon Gadget)
2) fileEx::SetGadgetState(GNum.i, Row.i): Change the selected/current row (as in ListIcon Gadget too)
Again, thank you for this module and apologies for my mechanically translated English.
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 10:49 am
by Thorsten1867
Update:
- ListEx::SetState(GNum.i, Row.i=#PB_Default)
- Focus on the line in which a popup menu was opened with the right mouse button.
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 2:36 pm
by Paul
Great Module, very nicely done !
Note: Crashes if you "Right Click" on column header
Code: Select all
ListEx()\Row\Current = GetRow_(Y)
If SelectElement(ListEx()\Rows(), ListEx()\Row\Current) ;<<-- [ERROR] SelectElement(): SelectElement(): index value can not be negative
ListEx()\Focus = #True
ListEx()\Row\Focus = ListEx()\Row\Current
Draw_() ; Draw Focus
EndIf
Might want to add something like...
Code: Select all
ListEx()\Row\Current = GetRow_(Y)
If ListEx()\Row\Current > -1
If SelectElement(ListEx()\Rows(), ListEx()\Row\Current)
ListEx()\Focus = #True
ListEx()\Row\Focus = ListEx()\Row\Current
Draw_() ; Draw Focus
EndIf
EndIf
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 5:16 pm
by zikitrake
Thorsten1867 wrote:Update:
- ListEx::SetState(GNum.i, Row.i=#PB_Default)
- Focus on the line in which a popup menu was opened with the right mouse button.
You've made the impossible in the last few decades: Make me happy on Sunday afternoon.
THANK YOU 
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 5:24 pm
by Thorsten1867
Paul wrote:Note: Crashes if you "Right Click" on column header
Bug fixed
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Sun Jun 09, 2019 7:00 pm
by davido
@
Thorsten1867,
Thank you for the updates.

Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Mon Jun 10, 2019 11:35 am
by zikitrake
Please, another request, if possible:
Modify
ListEx::SetItemImage to works with column header?
Thank you!
PS: I'm really enjoying updating my project to ListEx
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Mon Jun 10, 2019 12:01 pm
by Thorsten1867
Lord wrote:Is it also possible to include a progressbargadget in the same way?
This would be a nice enhancement.

Update:
- Support of progressbars (#ProgressBar) for ListEx::AddColumn()
- Added: SetProgressBarAttribute() - Set mininum or maximum value for all progressbars
- Added: SetProgressBarFlags() - Set #ShowPercent flag to additionally display the progress as a percentage number
- Added: #Progress$ to insert the current percentage into the progressbar text
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Mon Jun 10, 2019 12:33 pm
by Thorsten1867
zikitrake wrote:Modify ListEx::SetItemImage to works with column header?
Update:
- Support of images in the header (#Header)
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Mon Jun 10, 2019 11:05 pm
by zikitrake
----- Edited -----
I solved the issue: Just disabling
AttachPopupMenu line and inserting a new line in the righ-click event
Code: Select all
DisplayPopupMenu(#PopupMenu2, WindowID(#Window))
------ END EDITION ---
I don't sure if it's an error of the module or my fails (I have a great hability to generate silly errors

)
In this code, first time you do a right-click it display the popup menu, but it ignores the event in the line
Code: Select all
If EventType() = #PB_EventType_RightClick
Then, in the following right-click, it does the event but does not detect the current line, but the line that previously had the focus.
Code: Select all
CompilerIf #PB_Compiler_IsMainFile
#Window = 0
Enumeration 1
#List
#PopupMenu
#MenuItem1
EndEnumeration
If OpenWindow(#Window, 0, 0, 500, 500, "Window", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget)
If CreatePopupMenu(#PopupMenu)
MenuItem(#MenuItem1, "Click me")
EndIf
ListEx::Gadget(#List, 10, 10, 400, 70, "", 25, "", ListEx::#GridLines)
ListEx::AddColumn(#List, 0, "header1", 125)
ListEx::AddItem(#List, ListEx::#LastItem, "Randy Rhoads")
ListEx::AddItem(#List, ListEx::#LastItem, "Ozzy Osbourne")
ListEx::AttachPopupMenu(#List, #PopupMenu)
Repeat
Event = WaitWindowEvent()
MenuID =EventMenu()
GadgetID = EventGadget()
Select Event
Case ListEx::#Event_Gadget ; works with or without EventType()
If EventType() = ListEx::#EventType_Row
;Debug ">>> Row: " + Str(EventData()) + " on List" + Str(GadgetID)
EndIf
Case #PB_Event_Menu
Case #PB_Event_Gadget
Select gadgetID
Case #List ;{ only in use with EventType()
If EventType() = #PB_EventType_RightClick
curRow = ListEx::GetState(#List)
Debug "Name Selected in #Row" + str(curRow) + ": " + ListEx::GetItemText(#List, curRow, 0)
EndIf
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
CompilerEndIf
Re: [Modules] Editable and sortable ListGadget (all OS / DPI
Posted: Tue Jun 11, 2019 5:00 am
by Rinzwind
Impressive job. What's yet missing is full keyboard navigation.