diff --git a/comp/src/gb.form/.src/GridView/GridView.class b/comp/src/gb.form/.src/GridView/GridView.class index 4d65a0242..2485b57ce 100644 --- a/comp/src/gb.form/.src/GridView/GridView.class +++ b/comp/src/gb.form/.src/GridView/GridView.class @@ -955,7 +955,7 @@ Public Sub TimerEnsureVisible_Timer() $iRowEV = -1 With $hColumns[$iColEV] - $hView.EnsureVisible(.X, $hRows._GetRowY(iRowEV), .Width + $hRows.Width, $hRows._GetRowHeight(iRowEV) + $hColumns.Height) + $hView.EnsureVisible(.X, $hRows._GetRowY(iRowEV), Min($hView.ClientW - $hRows.W, .Width + $hRows.Width), $hRows._GetRowHeight(iRowEV) + $hColumns.Height) End With Catch diff --git a/comp/src/gb.form/.src/TableView.class b/comp/src/gb.form/.src/TableView.class index 4500bad25..6dafb5f4d 100644 --- a/comp/src/gb.form/.src/TableView.class +++ b/comp/src/gb.form/.src/TableView.class @@ -104,23 +104,38 @@ End Private Sub MoveEditor() - Dim X, Y As Integer + Dim X, Y, W, H As Integer + Dim MX, MY, MW, MH As Integer If Not $hEditor Then Return $bDoNotHideEditor = True + Me[$iRow, $iCol].EnsureVisible + Wait + X = Me.ScreenX - Me.Window.ScreenX - Me.Window.ClientX + Me.Rows.Width - Me.ScrollX + Me.ClientX Y = Me.ScreenY - Me.Window.ScreenY - Me.Window.ClientY + Me.Columns.Height - Me.ScrollY + Me.ClientY + MX = Me.ScreenX - Me.Window.ScreenX - Me.Window.ClientX + Me.Rows.Width - Me.ScrollX + Me.ClientX + MY = Me.ScreenY - Me.Window.ScreenY - Me.Window.ClientY + Me.Columns.Height - Me.ScrollY + Me.ClientY + $bDoNotHideEditor = False With Me[$iRow, $iCol] X += .X Y += .Y + W = Min(Me.ClientW - Me.Rows.W, .Width) + H = Min(Me.ClientH - Me.Columns.H, .Height) - $hEditor.Move(X, Y, .Width, .Height) + If W < 4 Or If H < 4 Then + HideEditor + Return + Endif + + + $hEditor.Move(X, Y, W, H) ' Else ' $hEditor.Move(X, Y, .Width + 1, .Height + 1) ' Endif