Page 2 of 5

Re: [Module] GridExModule.pbi

Posted: Fri Nov 10, 2017 7:56 pm
by Lord
USCode wrote:...
Using PB 5.61 x64, getting an "Invalid memory access" error on line 5603:

Code: Select all

Grid(gid$)\Rows(r)\Height = Size\Rows(r)
Me too on Win7 x64 with PB5.60 x64.

Edit:
Change (starting at line 6369)

Code: Select all

    If FileSize("GridEx.win")
      GridEx::LoadGridSize(#Grid, "GridEx.win", GridEx::#Window|GridEx::#Grid)
    EndIf
to

Code: Select all

    If FileSize("GridEx.win")>0
      GridEx::LoadGridSize(#Grid, "GridEx.win", GridEx::#Window|GridEx::#Grid)
    EndIf
and it works, because there is no GridEx.win at first run.

Re: [Module] GridExModule.pbi

Posted: Fri Nov 10, 2017 9:36 pm
by Thorsten1867
Fixed

Added: Sort arrows for column header
Added: Editable ComboBox (enter text or select from list)
Added: CellTyp automatically sets appropriate formatting
Added: Image as cell content

Re: [Module] GridExModule.pbi

Posted: Sun Nov 12, 2017 9:25 pm
by Kwai chang caine
Added: CellTyp automatically sets appropriate formatting
Added: Image as cell content
Thanks a lot 8)

Re: [Module] GridExModule.pbi

Posted: Sun Nov 12, 2017 11:05 pm
by Thorsten1867
Added: Additional different colored lines (e.g. for calculation row)
Changed: Optical improvements (e.g. FocusBorder & Default colors)

Added: Checking the validity of entries for editable cells (#Integer/#Float/#Date/#Time/#Cash)

Update: a lot of Bugfixes

Re: [Module] GridExModule.pbi

Posted: Tue Nov 14, 2017 10:30 pm
by said
A new important update with bug fixes of MyGrid is available ...

Said

Re: [Module] GridExModule.pbi

Posted: Sun Nov 19, 2017 7:00 pm
by Thorsten1867
Changed: Completely new event management
Added: Additional colored frames for single cells
Added: GetSelection(), to use selected cells for external procedures (e.g. merge cells)
Added: Copy selected cells to/from ClipBoard (CSV or Tabulator)
Added: Allow or forbid to change the size of the column and row (whole grid or single rows and columns).
Added: Themes for grid (e.g. header colors ...)
Added: Accept only valid entries for editable cells (#Valid)
Added: Cell type grades (DE/AT/GB/US/FR/ES/IT)
Added: Update calculations if a cell has been edited with the #Update flag

Some features available via pop-up menu for testing.

Re: [Module] GridExModule.pbi

Posted: Sun Nov 19, 2017 7:57 pm
by skywalk
Example 2 and hit [PageDown] wrote:[13:53:07] Waiting for executable to start...
[13:53:07] Executable type: Windows - x64 (64bit, Unicode, Thread)
[13:53:07] Executable started.
[13:53:41] [ERROR] GridExModule.pbi (Line: 1742)
[13:53:41] [ERROR] SelectElement(): SelectElement(): index value can not be negative.
[PageUp] works?

Re: [Module] GridExModule.pbi

Posted: Sun Nov 19, 2017 8:20 pm
by skywalk
Issues:
1. If I LeftClick the top left grid header, it sorts according to Column 1.
Normally, that = select all cells?
Where to call SelectAll(GID)? Line 6720 seems possible, but need to query GridEx for top left grid.

Code: Select all

        Case #PB_EventType_LeftButtonDown  ;{ LeftButtonDown
          X  = GetGadgetAttribute(Grid()\CanvasID, #PB_Canvas_MouseX)
          Y  = GetGadgetAttribute(Grid()\CanvasID, #PB_Canvas_MouseY)
          ColArea = _AreaCol_Of_X(GID, X)
          RowArea = _AreaRow_Of_Y(GID, Y)
          Grid()\Mouse\DownX = X
          Grid()\Mouse\DownY = Y
          Grid()\Mouse\DownAreaRow = RowArea
          Grid()\Mouse\DownAreaCol = ColArea
          If RowArea > 0 And ColArea > 0
            RemoveSelection(GID)
            SelectElement(Grid()\Row\AreaList(), RowArea)
            SelectElement(Grid()\Col\AreaList(), ColArea)
            ShowCell(GID, Grid()\Row\AreaList()\AreaRow, Grid()\Col\AreaList()\AreaCol, #True)
          Else
            SelectAll(GID)  ;<-- This needs additional filter for ONLY top left header click?
          EndIf ;}

2.
Example 1 and resize window width to a minimum. wrote:[14:03:02] Waiting for executable to start...
[14:03:02] Executable type: Windows - x64 (64bit, Unicode, Thread)
[14:03:02] Executable started.
[14:04:42] [ERROR] GridExModule.pbi (Line: 3120)
[14:04:42] [ERROR] The list doesn't have a current element.
[14:04:49] [ERROR] GridExModule.pbi (Line: 3120)
[14:04:49] [ERROR] Invalid memory access. (read error at address 18446744073709551615)

Re: [Module] GridExModule.pbi

Posted: Sun Nov 19, 2017 10:25 pm
by Thorsten1867
skywalk wrote:
Example 2 and hit [PageDown] wrote:[13:53:07] Waiting for executable to start...
[13:53:07] Executable type: Windows - x64 (64bit, Unicode, Thread)
[13:53:07] Executable started.
[13:53:41] [ERROR] GridExModule.pbi (Line: 1742)
[13:53:41] [ERROR] SelectElement(): SelectElement(): index value can not be negative.
[PageUp] works?
Fixed

Re: [Module] GridExModule.pbi

Posted: Sun Nov 19, 2017 10:37 pm
by Thorsten1867
skywalk wrote:Issues:
1. If I LeftClick the top left grid header, it sorts according to Column 1.
Normally, that = select all cells?
Changed

Re: [Module] GridExModule.pbi

Posted: Mon Nov 20, 2017 2:47 am
by wombats
This is really great!

Is it possible to put images in the header cells? It doesn't seem to work.

Can it show the resizing of columns as the user resizes them?

Re: [Module] GridExModule.pbi

Posted: Mon Nov 20, 2017 8:19 pm
by Thorsten1867
wombats wrote:This is really great!

Is it possible to put images in the header cells? It doesn't seem to work.

Can it show the resizing of columns as the user resizes them?
I'm working on it.

Gesendet von meinem KFSUWI mit Tapatalk

Re: [Module] GridExModule.pbi

Posted: Mon Nov 20, 2017 8:26 pm
by skywalk
Another item that would bring GridEx closer to Spreadsheet functionality is the ability to select non-contiguous rows and columns using [Ctrl]+LMBClick.
Examples:
User selects Col1 and Col3 and copies only their contents to clipboard or exports them to csv.
User selects Row1 and Row5 and copies only their contents to clipboard or exports them to csv.

Re: [Module] GridExModule.pbi

Posted: Tue Nov 21, 2017 5:28 pm
by Thorsten1867
Added: Mouse click in the left upper corner to select all cells
Added: Ctrl - Mouse click / Shift - Mouse click to select rows => Copy & Paste selected rows

Re: [Module] GridExModule.pbi

Posted: Tue Nov 21, 2017 5:58 pm
by skywalk
Cool, Google Drive link up to date, but Box = ; Last Update: 11.11.2017?