Page 7 of 33

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Mon Jun 17, 2019 9:50 am
by Thorsten1867
Bug fixed

Please try it again.

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Mon Jun 17, 2019 10:26 am
by zikitrake
Thorsten1867 wrote:Bug fixed

Please try it again.
It works fine now! No more rows()\number :lol:

Thank you again.

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Mon Jun 17, 2019 10:53 am
by zikitrake
:oops: 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() ?

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
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!

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Mon Jun 17, 2019 7:11 pm
by Thorsten1867
Bug fixed

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Wed Jul 03, 2019 6:17 pm
by RobertRioja
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

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Wed Jul 17, 2019 6:06 pm
by Thorsten1867
Update:
  • Align & font for individual columns of header row
  • SetHeaderHeight() added
  • SetFont() & SetColor() for individual columns
  • SetFont() extended by type parameters (#HeaderFont/#StringFont/#GadgetFont)

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Wed Jul 17, 2019 7:35 pm
by Thorsten1867
RobertRioja wrote:Is it possible to resize a column based on the content's width? If so, can you offer sample code?
Update: Added: new flag #FitColumn for AddColumn()

Re: [Modules] Editable and sortable ListGadget (all OS / DPI

Posted: Thu Jul 18, 2019 12:49 pm
by Thorsten1867
Update: CloseEdit() - closes all cells that are open for editing (StringGadget / ComboBox / DateGadget) and saves the changes.

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

Posted: Wed Jul 24, 2019 10:17 am
by Thorsten1867
Update: individual colors for the columns of the header line

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

Posted: Thu Jul 25, 2019 3:06 pm
by doctorized
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?

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

Posted: Thu Jul 25, 2019 6:00 pm
by Thorsten1867
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?
Have you ever tried the tab key? :wink:

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

Posted: Thu Jul 25, 2019 10:28 pm
by doctorized
Thorsten1867 wrote:Have you ever tried the tab key? :wink:
I tried it now and the cell just lost editing focus. Nothing more.

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

Posted: Fri Jul 26, 2019 9:43 am
by Thorsten1867
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)

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

Posted: Fri Jul 26, 2019 12:00 pm
by doctorized
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)
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.

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

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

Posted: Fri Jul 26, 2019 1:39 pm
by Thorsten1867
Try:

Code: Select all

ListEx::GetAttribute(#List, ListEx::#ColumnCount)