[DEVELOPMENT ENVIRONMENT]
* BUG: Fix behaviour of shortcut text properties having ampersands inside. [GB.GUI.BASE] * BUG: Fix behaviour of shortcut text properties having ampersands inside. git-svn-id: svn://localhost/gambas/trunk@7253 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
9fd5ea4ad7
commit
e909d1ea5a
7 changed files with 24 additions and 13 deletions
|
@ -1635,7 +1635,15 @@ Public Function GetEachProperty(DX As Integer, DY As Integer, Optional bNoScale
|
|||
iPos = String.InStr(sVal, "&")
|
||||
If iPos Then
|
||||
sShortcut = String.Mid$(sVal, iPos + 1, 1)
|
||||
sLine &= "Shortcut((" & Quote(String.Left(sVal, iPos - 1) & String.Mid$(sVal, iPos + 1)) & "), " & Quote(sShortcut) & ")"
|
||||
If InStr("& ", sShortcut) Then
|
||||
sShortcut = ""
|
||||
Else
|
||||
sVal = String.Left(sVal, iPos - 1) & String.Mid(sVal, iPos + 1)
|
||||
Endif
|
||||
Endif
|
||||
|
||||
If sShortcut Then
|
||||
sLine &= "Shortcut((" & Quote(sVal) & "), " & Quote(sShortcut) & ")"
|
||||
Else
|
||||
sLine &= "(" & Quote(sVal) & ")"
|
||||
Endif
|
||||
|
|
|
@ -408,8 +408,9 @@ Private Sub FromString(sData As String, Optional hParent As CControl) As String
|
|||
|
||||
If InStr(sValue, "\\\"") Then Error "gambas3: "; File.Name(Path); ".form: "; sValue
|
||||
|
||||
aScan = Scan(Mid$(sValue, 10), "(*),*)*")
|
||||
vValue = Shortcut(UnQuote(Trim(aScan[0])), UnQuote(Trim(aScan[1])))
|
||||
aScan = Scan(Mid$(sValue, 10), "(*)*)*")
|
||||
|
||||
vValue = Shortcut(UnQuote(Trim(aScan[0])), UnQuote(Trim(Mid(aScan[1], 2))))
|
||||
If aScan[2] Then vValue &= UnQuote(Trim(Mid$(Trim(aScan[2]), 2)))
|
||||
|
||||
Else
|
||||
|
|
|
@ -549,7 +549,7 @@
|
|||
}
|
||||
}
|
||||
{ svwWorkspace ScrollView
|
||||
MoveScaled(2,14,58,39)
|
||||
MoveScaled(3,14,58,39)
|
||||
Background = Color.LightForeground
|
||||
Expand = True
|
||||
Border = False
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Component]
|
||||
Key=gb.gui.base
|
||||
Version=3.8.0
|
||||
Version=3.8.90
|
||||
Hidden=True
|
||||
Needs=Form
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.8.0
|
||||
# Compiled with Gambas 3.8.90
|
||||
Title=gb.gui.base
|
||||
Startup=FGridView
|
||||
Version=3.8.0
|
||||
Version=3.8.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
|
|
|
@ -6,11 +6,13 @@ Static Public Sub _call(Text As String, Shortcut As String) As String
|
|||
|
||||
Dim iPos As Integer
|
||||
|
||||
iPos = String.InStr(Text, "&")
|
||||
If iPos Then
|
||||
Shortcut = String.Mid$(Text, iPos + 1, 1)
|
||||
Text = Left(Text, iPos - 1) & Mid$(Text, iPos + 1)
|
||||
Endif
|
||||
' iPos = String.InStr(Text, "&")
|
||||
' If iPos Then
|
||||
' Shortcut = String.Mid$(Text, iPos + 1, 1)
|
||||
' Text = String.Left(Text, iPos - 1) & String.Mid$(Text, iPos + 1)
|
||||
' Endif
|
||||
|
||||
If Not Shortcut Then Return Text
|
||||
|
||||
iPos = InStr(Text, Shortcut, 1, gb.IgnoreCase)
|
||||
If iPos = 0 Then Return Text '& " (&" & String.UCase(Shortcut) & ")"
|
||||
|
|
|
@ -2,7 +2,7 @@ FGridView
|
|||
gb.gui.base
|
||||
0
|
||||
0
|
||||
3.8.0
|
||||
3.8.90
|
||||
|
||||
gb.image
|
||||
gb.gui
|
||||
|
|
Loading…
Reference in a new issue