Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • 3.20.3
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
115 results

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • 3.20.3
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
115 results
Show changes
Commits on Source (2)
# Gambas Project File 3.0
Title=Common controls and classes for GUI components
Startup=FTestIconView
Startup=FTestGridView
Icon=.hidden/window.png
Version=3.17.90
VersionFile=1
......
......@@ -217,7 +217,7 @@ Private Sub DrawCell(X As Integer, Y As Integer, W As Integer, H As Integer, iRo
Dim A As Integer
Dim iColor As Integer
Dim bCancel As Boolean
Dim iPadding As Integer
Dim iPaddingH, iPaddingV As Integer
Dim iBg As Integer
Paint.Save
......@@ -266,14 +266,13 @@ Private Sub DrawCell(X As Integer, Y As Integer, W As Integer, H As Integer, iRo
End With
Endif
iPadding = Max($iPadding, .Padding)
iPaddingH = Max($iPadding, .Padding) + $hColumns.Padding
iPaddingV = Max($iPadding, .Padding) + $hRows.Padding
If iPadding Then
X += iPadding
Y += iPadding
W -= iPadding * 2
H -= iPadding * 2
Endif
X += iPaddingH
Y += iPaddingV
W -= iPaddingH * 2
H -= iPaddingV * 2
If W <= 0 Or If H <= 0 Then Goto DRAW_GRID
......@@ -319,8 +318,8 @@ Private Sub DrawCell(X As Integer, Y As Integer, W As Integer, H As Integer, iRo
DrawAlignedPicture(hPict, X, Y, W, H, A)
W -= hPict.W + iPadding
If Not Me.RightToLeft Then X += hPict.W + iPadding
W -= hPict.W + iPaddingH
If Not Me.RightToLeft Then X += hPict.W + iPaddingH
Endif
......@@ -2171,7 +2170,7 @@ Public Sub _GetPreferredWidth(iCol As Integer) As Integer
Dim bBusy As Boolean
Dim J As Integer
PW = Me.Font.TextWidth($hColumns[iCol].Text) + Max(Desktop.Scale \ 2, $iPadding) * 2 + If($bSorted, 16, 0) + 2
PW = Me.Font.TextWidth($hColumns[iCol].Text) + Max(Desktop.Scale \ 2, $iPadding) * 2 + $hColumns.Padding * 2 + If($bSorted, 16, 0) + 2
fTime = Timer
......@@ -2301,7 +2300,7 @@ Public Sub _GetPreferredHeight(iRow As Integer) As Integer
With hData
iPadding = Max($iPadding, .Padding)
iPadding = Max($iPadding, .Padding) + $hRows.Padding
H = iPadding * 2
hFont = .Font
If Not hFont Then hFont = Me.Font
......
......@@ -9,6 +9,7 @@ Property Resizable As Boolean
Property Width, W As Integer
Property Sort As Integer
Property Ascending As Boolean
Property Padding As Integer Use $iPadding
Event _Refresh
......@@ -258,3 +259,10 @@ Private Sub Ascending_Write(Value As Boolean)
End With
End
Private Sub Padding_Write(Value As Integer)
$iPadding = Value
_Layout
End
......@@ -9,6 +9,7 @@ Property Resizable As Boolean
Property Height, H As Integer
Property Selection As Integer[]
Property Border As Border
Property Padding As Integer Use $iPadding
Event _Refresh
......@@ -117,7 +118,7 @@ Public Sub _GetDefaultRowHeight() As Integer
If $iDefaultHeight > 0 Then Return $iDefaultHeight
hView = GetView()
H = hView._GetTextHeight() + hView.Padding * 2 + 2
H = hView._GetTextHeight() + hView.Padding * 2 + $iPadding * 2 + 2
If $hBorder Then
With $hBorder
H += .TopPadding + .BottomPadding + .TopWidth + .BottomWidth + .TopMargin + .BottomMargin
......@@ -573,3 +574,10 @@ Public Sub _GetRowTextAlign(iRow As Integer) As Integer
Endif
End
Private Sub Padding_Write(Value As Integer)
$iPadding = Value
GetView()._ResizeContents()
End
......@@ -3,7 +3,7 @@
Export
Inherits UserControl
Public Const _Properties As String = "*,List,Border=True,Mode{Select.*}=Single,ScrollBar{Scroll.*}=Vertical,Wrap,Sorted"
Public Const _Properties As String = "*,List,Border=True,Grid,Mode{Select.*}=Single,ScrollBar{Scroll.*}=Vertical,Wrap,Sorted"
Public Const _Group As String = "View"
Public Const _DefaultEvent As String = "Click"
Public Const _DefaultSize As String = "16,16"
......@@ -20,6 +20,7 @@ Property Read Text As String
Property List As String[]
Property Font As Font
Property Wrap As Boolean
Property Grid As Boolean
Property ScrollX As Integer
Property ScrollY As Integer
......@@ -510,3 +511,16 @@ Public Sub GridView_Arrange()
If $bWrap Then ResizeLater
End
Private Function Grid_Read() As Boolean
Return $hView.Grid
End
Private Sub Grid_Write(Value As Boolean)
$hView.Grid = Value
$hView.Rows.Padding = If(Value, Desktop.Scale, 0)
End
......@@ -107,6 +107,9 @@ Public Sub Form_Open()
txtPadding.Value = gvwInfo.Padding
gvwInfo.Rows.Padding = Desktop.Scale \ 2
gvwInfo.Columns.Padding = Desktop.Scale
Me.Height += 2
End
......