[REBOL] Re: specifiv position in area
From: philb:upnaway at: 25-Feb-2002 18:03
view layout [
field silver silver
area silver silver
This should give you the save color in fields & areas when in focus as when out of focus.
Of course you can use any color in place of silver.
=== Original Message ===
your new sample avoids the crash of the window. During the weekend i found
some time to work on the code and found out what "system/view/caret" is for
(previously i didn't know that). So, the problem was that when i type some
extra lines and then want to insert some text in or behind the new lines, a debug
printout for "system/view/caret" returns none and gives an error for the
insert function. Your new code avoids this crash problem, but still lacks the
functionality of inserting text right after the new textlines.
I found out that just refocussing the area solves the problem like:
view layout [
a: area "place your cursor then click button" button "insert" [
;--a/line-list: none ; *Forces recalculation of line offsets.
system/view/caret: insert system/view/caret "<inserted>"
This solves the problem, but is not very nicefor a user, cause the window is
blinking due to setting the focus. Is there a way that when the area is
active it has the same color as being not active?
Perhaps you, as a more advanced Rebol-Programmer, have a more elegant way to