From 2c6944c285459d99183310058330c591828bd0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Carri=C3=B3n=20Molpeceres?= Date: Mon, 11 Mar 2019 18:34:11 +0000 Subject: [PATCH] Update FWorkspace.class --- .../.src/Workspace/FWorkspace.class | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/comp/src/gb.form.mdi/.src/Workspace/FWorkspace.class b/comp/src/gb.form.mdi/.src/Workspace/FWorkspace.class index 28fec6efe..d19fbf075 100644 --- a/comp/src/gb.form.mdi/.src/Workspace/FWorkspace.class +++ b/comp/src/gb.form.mdi/.src/Workspace/FWorkspace.class @@ -1,4 +1,5 @@ ' Gambas class file +Property CloseButton As Boolean Private $aWindow As New CWindow[] Private $hCurrent As CWindow @@ -14,7 +15,7 @@ Private $bNoClose As Boolean Private $iLock As Integer Private $bBorder As Boolean = True Private $nDetach As Integer - +Private $CloseButton As Boolean = True Private Enum CLOSE_ALL, CLOSE_OTHER, CLOSE_RIGHT Private $hImage As Image @@ -533,7 +534,11 @@ Public Sub UpdateSize() Endif - tabWorkspace.CloseButton = $aWindow.Count >= 1 + If $CloseButton Then + tabWorkspace.CloseButton = $aWindow.Count >= 1 + Else + tabWorkspace.CloseButton = False + Endif 'DEBUG tabWorkspace.Visible;; "Index =";; tabWorkspace.Index;; "ClientY =";; tabWorkspace.ClientY @@ -1043,3 +1048,15 @@ Public Sub IsCloseWithMouse() As Boolean Return Not tabWorkspace.Closable End + +Private Function CloseButton_Read() As Boolean + + Return $CloseButton + +End + +Private Sub CloseButton_Write(Value As Boolean) + + $CloseButton = Value + +End