Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f4a6958

Browse files
Merge pull request #2000 from BerndN/patch-5
[Bug 21580] Make button "show grid" toggle state
2 parents 4d8d270 + d59525c commit f4a6958

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Toolset/palettes/inspector/editors/com.livecode.pi.textcontents.behavior.livecodescript

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on editorInitialize
1010
set the itemdelimiter to "."
1111
put item -1 of the editorProperty["editor"] of me into sTextType
1212

13+
set the toolTip of button "wrap text" of me to "wrap text"
14+
set the toolTip of button "show grid" of me to "show grid"
15+
set the toolTip of button "import" of me to "import file"
16+
1317
set the editorExpandVertical of me to true
1418
end editorInitialize
1519

@@ -99,11 +103,18 @@ on mouseUp
99103
case "show grid"
100104
local tGrid
101105
put not the hilite of the target into tGrid
106+
set the hilite of the target to tGrid
102107
set the hGrid of fld "HtmlText" to tGrid
103108
set the vGrid of fld "HtmlText" to tGrid
104-
set the tabStops of fld "HtmlText" to 150
105-
set the dontWrap of fld "HtmlText" to tGrid
106-
set the hScrollbar of fld "HtmlText" to tGrid
109+
if tGrid then
110+
set the tabStops of fld "HtmlText" to 150
111+
set the dontWrap of fld "HtmlText" to tGrid
112+
set the hScrollbar of fld "HtmlText" to tGrid
113+
else
114+
set the tabStops of fld "HtmlText" to 75
115+
set the dontWrap of fld "HtmlText" to not the hilite of button "wrap text"
116+
set the hScrollbar of fld "HtmlText" to not the hilite of button "wrap text"
117+
end if
107118
break
108119
case "import"
109120
local tFile

notes/bugfix-21580.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Make button "show grid" toggle

0 commit comments

Comments
 (0)