Form editor: Add a information line on the toolbox that displays the name of the current hovered toolbox control, and the component it belongs to.
[DEVELOPMENT ENVIRONMENT] * BUG: Hitting ESC key when the focus is on the console immediate command textbox now always closes the console tab. * NEW: Form editor: Add a information line on the toolbox that displays the name of the current hovered toolbox control, and the component it belongs to.
This commit is contained in:
parent
ee81637c72
commit
d37d6c97b8
6 changed files with 61 additions and 28 deletions
|
@ -193,11 +193,6 @@
|
||||||
Text = ("Cancel")
|
Text = ("Cancel")
|
||||||
Picture = Picture["icon:/small/halt"]
|
Picture = Picture["icon:/small/halt"]
|
||||||
}
|
}
|
||||||
{ spnSearch Spinner
|
|
||||||
MoveScaled(6,0,4,4)
|
|
||||||
Visible = False
|
|
||||||
Padding = 4
|
|
||||||
}
|
|
||||||
{ btnCloseSearch ToolButton
|
{ btnCloseSearch ToolButton
|
||||||
MoveScaled(11,0,10,4)
|
MoveScaled(11,0,10,4)
|
||||||
AutoResize = True
|
AutoResize = True
|
||||||
|
@ -221,11 +216,16 @@
|
||||||
Expand = True
|
Expand = True
|
||||||
}
|
}
|
||||||
{ lblBrowse Label
|
{ lblBrowse Label
|
||||||
MoveScaled(77,0,11,4)
|
MoveScaled(73,0,11,4)
|
||||||
Font = Font["Italic"]
|
Font = Font["Italic"]
|
||||||
Padding = 4
|
Padding = 4
|
||||||
AutoResize = True
|
AutoResize = True
|
||||||
}
|
}
|
||||||
|
{ spnSearch Spinner
|
||||||
|
MoveScaled(86,0,4,4)
|
||||||
|
Visible = False
|
||||||
|
Padding = 4
|
||||||
|
}
|
||||||
{ panButtonSearch Panel
|
{ panButtonSearch Panel
|
||||||
MoveScaled(90,0,4,4)
|
MoveScaled(90,0,4,4)
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,6 +378,8 @@ Public Sub txtEnter_KeyPress()
|
||||||
Else If Key.Code = Key.End And If Key.Control Then
|
Else If Key.Code = Key.End And If Key.Control Then
|
||||||
trmOutput.Goto(0, trmOutput.Count - 1)
|
trmOutput.Goto(0, trmOutput.Count - 1)
|
||||||
Stop Event
|
Stop Event
|
||||||
|
Else If Key.Code = Key.Escape Then
|
||||||
|
Action["console"].Value = False
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
|
@ -250,7 +250,6 @@ Public Sub RefreshToolbar(Optional bForce As Boolean)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
Private Sub ClearToolBar()
|
Private Sub ClearToolBar()
|
||||||
|
|
||||||
$sLastLib = ""
|
$sLastLib = ""
|
||||||
|
@ -258,8 +257,6 @@ Private Sub ClearToolBar()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Public Sub Form_Close()
|
' Public Sub Form_Close()
|
||||||
'
|
'
|
||||||
' 'Config.SaveWindow(ME, "/FToolBox")
|
' 'Config.SaveWindow(ME, "/FToolBox")
|
||||||
|
@ -285,7 +282,6 @@ Public Function GetTool() As String
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
Public Sub SetTool()
|
Public Sub SetTool()
|
||||||
|
|
||||||
If Not $sToolBar Then Return
|
If Not $sToolBar Then Return
|
||||||
|
@ -293,7 +289,6 @@ Public Sub SetTool()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
' PUBLIC SUB ToolBar_Change()
|
' PUBLIC SUB ToolBar_Change()
|
||||||
'
|
'
|
||||||
' PRINT "ToolBar_Change: "; LAST.Name
|
' PRINT "ToolBar_Change: "; LAST.Name
|
||||||
|
@ -302,11 +297,10 @@ End
|
||||||
|
|
||||||
Public Sub GetSize() As Integer
|
Public Sub GetSize() As Integer
|
||||||
|
|
||||||
Return 24 + Settings["/ToolboxSize", 0] * 8
|
Return 24 + Settings["/Toolbox/Size", 0] * 8
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
Private Sub UpdateSize()
|
Private Sub UpdateSize()
|
||||||
|
|
||||||
Dim iSize As Integer = GetSize()
|
Dim iSize As Integer = GetSize()
|
||||||
|
@ -318,11 +312,14 @@ Private Sub UpdateSize()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub ReadConfig()
|
Public Sub ReadConfig()
|
||||||
|
|
||||||
tabTool.TextFont = Project.GetSmallFont()
|
Dim hFont As Font
|
||||||
|
|
||||||
|
hFont = Project.GetSmallFont()
|
||||||
|
tabTool.TextFont = hFont
|
||||||
|
panTooltip.Font = hFont
|
||||||
|
panTooltip.Height = hFont.H + 4
|
||||||
UpdateSize
|
UpdateSize
|
||||||
|
|
||||||
End
|
End
|
||||||
|
@ -388,9 +385,17 @@ Public Sub btnZoom_Click()
|
||||||
|
|
||||||
Dim iSize As Integer
|
Dim iSize As Integer
|
||||||
|
|
||||||
iSize = Settings["/ToolboxSize", 0]
|
iSize = Settings["/Toolbox/Size", 0]
|
||||||
iSize = (iSize + 1) Mod 4
|
iSize = (iSize + 1) Mod 4
|
||||||
Settings["/ToolboxSize"] = iSize
|
Settings["/Toolbox/Size"] = iSize
|
||||||
UpdateSize
|
UpdateSize
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
Public Sub SetTooltip(Optional sControl As String, sComp As String)
|
||||||
|
|
||||||
|
If sComp = "$" Then sComp = "<i>" & ("Current project") & "</i>"
|
||||||
|
lblControl.Text = sControl
|
||||||
|
lblComp.Text = sComp
|
||||||
|
|
||||||
|
End
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
# Gambas Form File 3.0
|
# Gambas Form File 3.0
|
||||||
|
|
||||||
{ Form Form
|
{ Form Form
|
||||||
MoveScaled(0,0,36,47)
|
MoveScaled(0,0,36,50)
|
||||||
Persistent = True
|
Persistent = True
|
||||||
Arrangement = Arrange.Fill
|
Arrangement = Arrange.Vertical
|
||||||
{ tabTool TabPanel
|
{ tabTool TabPanel
|
||||||
MoveScaled(1,1,33,45)
|
MoveScaled(0,1,34,39)
|
||||||
Font = Font["-1"]
|
Font = Font["-1"]
|
||||||
|
Expand = True
|
||||||
Arrangement = Arrange.Fill
|
Arrangement = Arrange.Fill
|
||||||
Padding = 2
|
Padding = 2
|
||||||
Border = False
|
Border = False
|
||||||
|
@ -15,6 +16,26 @@
|
||||||
Text = ("")
|
Text = ("")
|
||||||
Index = 0
|
Index = 0
|
||||||
}
|
}
|
||||||
|
{ Separator1 Separator
|
||||||
|
MoveScaled(8,44,21,0)
|
||||||
|
}
|
||||||
|
{ panTooltip HBox
|
||||||
|
MoveScaled(1,46,33,3)
|
||||||
|
{ lblControl Label
|
||||||
|
MoveScaled(4,0,10,3)
|
||||||
|
Font = Font["Bold"]
|
||||||
|
Expand = True
|
||||||
|
Alignment = Align.Right
|
||||||
|
}
|
||||||
|
{ Panel1 Panel
|
||||||
|
MoveScaled(15,0,1,3)
|
||||||
|
}
|
||||||
|
{ lblComp TextLabel
|
||||||
|
MoveScaled(21,0,10,3)
|
||||||
|
Expand = True
|
||||||
|
Alignment = Align.Left
|
||||||
|
}
|
||||||
|
}
|
||||||
{ btnZoom ToolButton
|
{ btnZoom ToolButton
|
||||||
MoveScaled(24,6,4,4)
|
MoveScaled(24,6,4,4)
|
||||||
Visible = False
|
Visible = False
|
||||||
|
|
|
@ -30,7 +30,6 @@ Public Sub _new(sName As String, sType As String)
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
Public Sub Add(sControl As String, Optional sComp As String, Optional sType As String)
|
Public Sub Add(sControl As String, Optional sComp As String, Optional sType As String)
|
||||||
|
|
||||||
Dim hCtrl As ToolButton
|
Dim hCtrl As ToolButton
|
||||||
|
@ -43,10 +42,10 @@ Public Sub Add(sControl As String, Optional sComp As String, Optional sType As S
|
||||||
H = $iSize + 8
|
H = $iSize + 8
|
||||||
|
|
||||||
hCtrl = New ToolButton(panTool) As "btnControl"
|
hCtrl = New ToolButton(panTool) As "btnControl"
|
||||||
hCtrl.Tag = [sControl, sType]
|
hCtrl.Tag = [sControl, sType, sComp]
|
||||||
hCtrl.Border = False
|
hCtrl.Border = False
|
||||||
hCtrl.Toggle = True
|
hCtrl.Toggle = True
|
||||||
hCtrl.ToolTip = sControl
|
'hCtrl.ToolTip = sControl
|
||||||
hCtrl.Design = True
|
hCtrl.Design = True
|
||||||
|
|
||||||
hPict = CControl.GetIcon(sControl, sComp)
|
hPict = CControl.GetIcon(sControl, sComp)
|
||||||
|
@ -68,8 +67,6 @@ Public Sub Exist(sControl As String) As Boolean
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' PUBLIC SUB Form_Resize()
|
' PUBLIC SUB Form_Resize()
|
||||||
'
|
'
|
||||||
' DIM hCtrl AS ToolButton
|
' DIM hCtrl AS ToolButton
|
||||||
|
@ -133,13 +130,21 @@ End
|
||||||
|
|
||||||
Public Procedure btnControl_Enter()
|
Public Procedure btnControl_Enter()
|
||||||
|
|
||||||
Last.Border = True
|
Dim hCtrl As ToolButton = Last
|
||||||
|
|
||||||
|
hCtrl.Border = True
|
||||||
|
If IsNull(hCtrl.Tag[2]) Then
|
||||||
|
FToolBox.SetTooltip()
|
||||||
|
Else
|
||||||
|
FToolBox.SetTooltip(hCtrl.Tag[0], hCtrl.Tag[2])
|
||||||
|
Endif
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
Public Procedure btnControl_Leave()
|
Public Procedure btnControl_Leave()
|
||||||
|
|
||||||
Last.Border = False
|
Last.Border = False
|
||||||
|
FToolBox.SetTooltip()
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
|
@ -1704,7 +1704,7 @@ Private Sub SaveLayout(Optional sFile As String)
|
||||||
hSettings["Toolbar/Form"] = ToolBar.GetLayout("form")
|
hSettings["Toolbar/Form"] = ToolBar.GetLayout("form")
|
||||||
hSettings["Toolbar/Image"] = ToolBar.GetLayout("image")
|
hSettings["Toolbar/Image"] = ToolBar.GetLayout("image")
|
||||||
hSettings["ShowMenus"] = Settings["/ShowMenus"]
|
hSettings["ShowMenus"] = Settings["/ShowMenus"]
|
||||||
hSettings["ToolboxSize"] = Settings["/ToolboxSize"]
|
hSettings["Toolbox/Size"] = Settings["/Toolbox/Size"]
|
||||||
hSettings["CloseWithMiddleClick"] = Settings["/CloseWithMiddleClick"]
|
hSettings["CloseWithMiddleClick"] = Settings["/CloseWithMiddleClick"]
|
||||||
hSettings["ProjectFontSize"] = Settings["/ProjectFontSize"]
|
hSettings["ProjectFontSize"] = Settings["/ProjectFontSize"]
|
||||||
hSettings["TitleFontSize"] = Settings["/TitleFontSize"]
|
hSettings["TitleFontSize"] = Settings["/TitleFontSize"]
|
||||||
|
|
Loading…
Reference in a new issue