diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 96ebaf3d1..fb7d9ecc9 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,6 +1,6 @@ # Gambas Project File 3.0 Title=More controls for graphical components -Startup=FTestTabPanel +Startup=FTestFileChooser Icon=.hidden/icon.png Version=3.18.90 VersionFile=1 diff --git a/comp/src/gb.form/.src/Button/SwitchButton.class b/comp/src/gb.form/.src/Button/SwitchButton.class index 8f654ede1..a26be88ea 100644 --- a/comp/src/gb.form/.src/Button/SwitchButton.class +++ b/comp/src/gb.form/.src/Button/SwitchButton.class @@ -41,7 +41,7 @@ Private Sub Animated_Write((Value) As Boolean) Static bWarn As Boolean If bWarn Then Return - Error "gb.form: warning: SwitchButton.Animated is deprecated." + Error "gb.form: warning: 'SwitchButton.Animated' is deprecated." bWarn = True End diff --git a/comp/src/gb.form/.src/File/Chooser/FileChooser.class b/comp/src/gb.form/.src/File/Chooser/FileChooser.class index 36723604c..394587989 100644 --- a/comp/src/gb.form/.src/File/Chooser/FileChooser.class +++ b/comp/src/gb.form/.src/File/Chooser/FileChooser.class @@ -143,12 +143,14 @@ End Private Function ShowDetailed_Read() As Boolean + Error "gb.form: warning: 'FileView.ShowDetailed' is deprecated. Use 'FileView.View' instead." Return frmChooser.GetShowDetailed() End Private Sub ShowDetailed_Write(bShowDetailed As Boolean) + Error "gb.form: warning: 'FileView.ShowDetailed' is deprecated. Use 'FileView.View' instead." frmChooser.SetShowDetailed(bShowDetailed) End diff --git a/comp/src/gb.form/.src/File/FileView.class b/comp/src/gb.form/.src/File/FileView.class index d9c60a437..a270c0c5d 100644 --- a/comp/src/gb.form/.src/File/FileView.class +++ b/comp/src/gb.form/.src/File/FileView.class @@ -896,17 +896,17 @@ End Private Function ShowDetailed_Read() As Boolean - Return $hColumnView.Visible + Return View_Read() = Detailed End -Private Sub ShowDetailed_Write(bDetailed As Boolean) +Private Sub ShowColumnView(bShow As Boolean) Dim hOld As Control - If bDetailed = ShowDetailed_Read() Then Return + If bShow = $hColumnView.Visible Then Return - If bDetailed Then + If bShow Then hOld = $hIconView $hColumnView.Show @@ -928,6 +928,17 @@ Private Sub ShowDetailed_Write(bDetailed As Boolean) End + +Private Sub ShowDetailed_Write(bDetailed As Boolean) + + If bDetailed Then + View_Write(Detailed) + Else + View_Write(Normal) + Endif + +End + Public Sub View_Select() Raise {Select} @@ -1661,24 +1672,58 @@ Private Sub View_Write(Value As Integer) If Value = View_Read() Then Return - ShowPreview_Write(False) - If Value = Detailed Then - ShowDetailed_Write(True) - Else - iIconSize = GetIconSize() - ShowDetailed_Write(False) - If Value = Compact Then - $hIconView.Orientation = Arrange.Horizontal - Else + Select Case Value + + Case Normal + ShowPreview_Write(False) + iIconSize = GetIconSize() + ShowColumnView(False) $hIconView.Orientation = Arrange.Vertical - If Value = Preview Then ShowPreview_Write(True) - Endif + + Case Compact + ShowPreview_Write(False) + iIconSize = GetIconSize() + ShowColumnView(False) + $hIconView.Orientation = Arrange.Horizontal + + Case Detailed + ShowPreview_Write(False) + ShowColumnView(True) + + Case Preview + ShowPreview_Write(False) + iIconSize = GetIconSize() + ShowColumnView(False) + $hIconView.Orientation = Arrange.Vertical + ShowPreview_Write(True) + + End Select + + If Value <> Detailed Then UpdateIconView If iIconSize <> GetIconSize() Then RefreshViewLater(True) Endif Endif + ' ShowPreview_Write(False) + ' If Value = Detailed Then + ' ShowColumnView(True) + ' Else + ' iIconSize = GetIconSize() + ' ShowColumnView(False) + ' If Value = Compact Then + ' $hIconView.Orientation = Arrange.Horizontal + ' Else + ' $hIconView.Orientation = Arrange.Vertical + ' If Value = Preview Then ShowPreview_Write(True) + ' Endif + ' UpdateIconView + ' If iIconSize <> GetIconSize() Then + ' RefreshViewLater(True) + ' Endif + ' Endif + End Private Sub UpdateIconView() diff --git a/comp/src/gb.form/.src/Font/FontChooser.class b/comp/src/gb.form/.src/Font/FontChooser.class index b7d2c7469..5928b8da8 100644 --- a/comp/src/gb.form/.src/Font/FontChooser.class +++ b/comp/src/gb.form/.src/Font/FontChooser.class @@ -16,7 +16,7 @@ Property Value As String Property FixedOnly As Boolean Property ShowStyle As Boolean Property ShowPreview As Boolean -Property ShowLabel As Boolean '' Deprecated +Property ShowLabel As Boolean Property ShowRelative As Boolean '' Return or set if font preview is displayed @@ -123,12 +123,14 @@ End Private Function ShowLabel_Read() As Boolean + Error "gb.form: warning: 'FontChooser.ShowLabel' is deprecated." Return frmChooser.IsShowLabel() End Private Sub ShowLabel_Write(Value As Boolean) + Error "gb.form: warning: 'FontChooser.ShowLabel' is deprecated." frmChooser.SetShowLabel(Value) End diff --git a/comp/src/gb.form/.src/Stock.class b/comp/src/gb.form/.src/Stock.class index 7d2aca445..c8cada713 100644 --- a/comp/src/gb.form/.src/Stock.class +++ b/comp/src/gb.form/.src/Stock.class @@ -710,7 +710,7 @@ End Static Private Function List_Read() As String[] - Error "gb.form: warning: Stock.List is deprecated. Use Stock.Icons instead" + Error "gb.form: warning: 'Stock.List' is deprecated. Use 'Stock.Icons' instead" Return Icons_Read() End diff --git a/comp/src/gb.form/.src/ValueBox.class b/comp/src/gb.form/.src/ValueBox.class index 5966e98c0..22b7ce7ab 100644 --- a/comp/src/gb.form/.src/ValueBox.class +++ b/comp/src/gb.form/.src/ValueBox.class @@ -405,6 +405,10 @@ Public Sub SelectAll() End +'' @{since 3.19} +'' +'' Unselect the editor contents. + Public Sub Unselect() Dim hCtrl As Object = $hCtrl diff --git a/comp/src/gb.form/.src/Wizard/Wizard.class b/comp/src/gb.form/.src/Wizard/Wizard.class index e984f2d51..2fe395d88 100644 --- a/comp/src/gb.form/.src/Wizard/Wizard.class +++ b/comp/src/gb.form/.src/Wizard/Wizard.class @@ -434,7 +434,7 @@ End Private Sub Animated_Write((Value) As Boolean) If $bDeprecated Then Return - Error "gb.form: Wizard.Animated is deprecated" + Error "gb.form: 'Wizard.Animated' is deprecated." $bDeprecated = True End