[GB.FORM]

* NEW: GridView[].EnsureVisible now keeps the left part of the cell always
  visible.
* BUG: The TableView editing field is now never larger than the TableView
  contents.


git-svn-id: svn://localhost/gambas/trunk@4548 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-03-14 01:34:14 +00:00
parent f8dfe7d8de
commit bd02074fed
2 changed files with 18 additions and 3 deletions

View file

@ -955,7 +955,7 @@ Public Sub TimerEnsureVisible_Timer()
$iRowEV = -1 $iRowEV = -1
With $hColumns[$iColEV] 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 End With
Catch Catch

View file

@ -104,23 +104,38 @@ End
Private Sub MoveEditor() 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 If Not $hEditor Then Return
$bDoNotHideEditor = True $bDoNotHideEditor = True
Me[$iRow, $iCol].EnsureVisible
Wait
X = Me.ScreenX - Me.Window.ScreenX - Me.Window.ClientX + Me.Rows.Width - Me.ScrollX + Me.ClientX 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 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 $bDoNotHideEditor = False
With Me[$iRow, $iCol] With Me[$iRow, $iCol]
X += .X X += .X
Y += .Y 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 ' Else
' $hEditor.Move(X, Y, .Width + 1, .Height + 1) ' $hEditor.Move(X, Y, .Width + 1, .Height + 1)
' Endif ' Endif