Page 13 of 33
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Oct 26, 2019 5:56 pm
by Thorsten1867
Update:
- Added: SetCellFlags() / RemoveCellFlag()
- Flags: #LockCell / #Strings / #ComboBoxes / #Dates
Code: Select all
ListEx::SetCellFlags(#List, 2, 3, ListEx::#Strings|ListEx::#LockCell)
ListEx::RemoveCellFlag(#List, 2, 3, ListEx::#LockCell)
@kinglestat
=> Q2 / Q3
Re: [Modules] ListEx (all OS / DPI)
Posted: Sun Oct 27, 2019 2:36 am
by kinglestat
thank you...that was fast!
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 01, 2019 4:19 pm
by kinglestat
Is it possible to change the type for a cell? For example if a cell is already a button can it be made into a string? etc
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 01, 2019 7:34 pm
by Thorsten1867
When it comes to single cells, you can use RemoveCellFlag() and SetCellFlags().
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Nov 02, 2019 7:45 am
by kinglestat
Excuse my ignorance
This is your example edited
Code: Select all
ListEx::AddItem(#List, ListEx::#LastItem, "Thomas" + #LF$ + "Roberts" + #LF$ + #LF$ + #LF$ + "Push")
ListEx::AddItem(#List, ListEx::#LastItem, "Harriet" + #LF$ + "Smith" + #LF$ + #LF$ + #LF$ + "Push")
ListEx::RemoveCellFlag(#List, 4, 5, ListEx::#Buttons )
ListEx::SetCellFlags(#List, 4, 5, ListEx::#Strings )
ListEx::SetItemState(#List, 3, ListEx::#Inbetween)
there is no change. What am I doing wrong?
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Nov 02, 2019 10:46 am
by Thorsten1867
Bugfix
@kinglestat
The cell type was changed, but the button was drawn anyway.
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Nov 02, 2019 11:41 am
by kinglestat
Thank you!
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Nov 02, 2019 11:57 am
by Thorsten1867
Update: Change column width with the mouse (#ResizeColumn)
Re: [Modules] ListEx (all OS / DPI)
Posted: Sat Nov 02, 2019 2:33 pm
by davido
@
Thorsten1867,
A very nice touch. Thank you.

Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 6:15 am
by Cyllceaux
Hey there,
Since I use ListEx with Dialogs, I changed the _ResizeHandler a little bit.
Code: Select all
If ListEx()\ReDraw
If ListEx()\FitCols : FitColumns_() : EndIf
UpdateColumnX_()
UpdateRowY_()
Draw_()
EndIf
At the moment I habe 13 ListEx in my application and only one is always shown. So it's no need to draw every ListEx, if it's not shown. I disable the drawing, when I hide the ListEx and enable the drawing, when its shown.
Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 8:31 am
by Thorsten1867
Cyllceaux wrote:Hey there,
Since I use ListEx with Dialogs, I changed the _ResizeHandler a little bit.
Code: Select all
If ListEx()\ReDraw
If ListEx()\FitCols : FitColumns_() : EndIf
UpdateColumnX_()
UpdateRowY_()
Draw_()
EndIf
At the moment I habe 13 ListEx in my application and only one is always shown. So it's no need to draw every ListEx, if it's not shown. I disable the drawing, when I hide the ListEx and enable the drawing, when its shown.
Just use ListEx::Hide().

Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 9:33 am
by Cyllceaux
I didn't know

Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 1:36 pm
by Thorsten1867
Cyllceaux wrote:I didn't know

I just added it, too.

Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 7:57 pm
by davido
@
Cyllceaux,
I note you use
ListEx with Dialogs.
I tried, but failed miserably.
Would you mind explaining how it works for you?
Re: [Modules] ListEx (all OS / DPI)
Posted: Mon Nov 04, 2019 8:15 pm
by Cyllceaux
Easy...
This is one of my Examples:
Important:
OpenGadgetList()
and
#UseExistingCanvas
#AutoResize
in the XML
Code: Select all
<canvas name="lstProjektAufgaben" flags="#PB_Canvas_Container"/>
in the Code
Code: Select all
Protected lstProjektAufgaben=DialogGadget(dialog,"lstProjektAufgaben")
Protected windowMain=DialogWindow(dialog)
UseModule ListEx
OpenGadgetList(lstProjektAufgaben)
Gadget(lstProjektAufgaben,0,0,0,0,"",20,"",#UseExistingCanvas|#GridLines|#AutoResize|#CheckBoxes,windowMain)
SetAutoResizeFlags(lstProjektAufgaben, #Height)
AddColumn(lstProjektAufgaben,1,"",20,"",#Image|#FitColumn)
AddColumn(lstProjektAufgaben,2,"Titel",100)
AddColumn(lstProjektAufgaben,3,"Status",100,"",#FitColumn)
AddColumn(lstProjektAufgaben,4,"Prozent",100,"",#FitColumn|#ProgressBar)
AddColumn(lstProjektAufgaben,5,"Start",100,"",#FitColumn)
AddColumn(lstProjektAufgaben,6,"Fällig",100,"",#FitColumn)
AddColumn(lstProjektAufgaben,7,"Projekt",100,"",#FitColumn)
SetAutoResizeColumn(lstProjektAufgaben, 2)
SetDateMask(lstProjektAufgaben,"%dd.%mm.%yyyy",3)
SetDateMask(lstProjektAufgaben,"%dd.%mm.%yyyy",4)
SetProgressBarAttribute(lstProjektAufgaben,#Minimum,0)
SetProgressBarAttribute(lstProjektAufgaben,#Maximum,100)
SetProgressBarFlags(lstProjektAufgaben, #ShowPercent)
SetHeaderSort(lstProjektAufgaben, 2, #Ascending, #Deutsch)
SetHeaderSort(lstProjektAufgaben, 3, #Ascending, #Deutsch)
SetHeaderSort(lstProjektAufgaben, 7, #Ascending, #Deutsch)
SetHeaderSort(lstProjektAufgaben, 4, #Ascending, #SortNumber|#HeaderSort|#SortArrows|#SwitchDirection)
SetHeaderSort(lstProjektAufgaben, 5, #Ascending, #SortDate|#HeaderSort|#SortArrows|#SwitchDirection)
SetHeaderSort(lstProjektAufgaben, 6, #Ascending, #SortDate|#HeaderSort|#SortArrows|#SwitchDirection)
BindGadgetEvent(lstProjektAufgaben,@evtProjektAufgabenChange(),#EventType_Row)
BindGadgetEvent(lstProjektAufgaben,@evtProjektAufgabenChangeCheckbox(),#EventType_CheckBox)
UnuseModule ListEx
evtProjektAufgabenChange() and evtProjektAufgabenChangeCheckbox() are my Method for row-changes and pushing the Checkboxes.
I want to use more controls in Dialogs, but not all have the#UseExistingCanvas Flag.