[view][focus] Weird black line..
[1/4] from: Izkata::Comcast::net at: 7-Apr-2005 21:19
When I run this code, there's a weird black vertical line at the beginning
of the box -
is there a way to remove it or do I have to live with it? (I've seen it
before... ugh.)
The thing is, if I don't use 'focus, the line is gone. But then the feel
doesn't work.
REBOL []
view/new Disp: center-face layout [
Fiel: box 200x24 green with [
edge: [color: red effect: 'ibevel size: 3x3]
font: [name: {Papyrus} size: 12 color: black shadow: none align:
'left]
] feel [
engage: func [a b c][
if b = 'key [
either char? c/key [
append Fiel/text trim/head/tail to-string c/key
show Fiel
][
]
]
]
]
]
focus Fiel
do-events
-Izzy Boy
[2/4] from: volker::nitsch::gmail::com at: 8-Apr-2005 9:59
Re: Weird black line..
On Thu, 7 Apr 2005 21:19:41 -0500, Izkata <[Izkata--comcast--net]> wrote:
> When I run this code, there's a weird black vertical line at the beginning
> of the box -
<<quoted lines omitted: 13>>
> either char? c/key [
> append Fiel/text trim/head/tail to-string c/key
system/view/caret: tail fiel/text ;)
> show Fiel
> ][
<<quoted lines omitted: 9>>
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
--
-Volker
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.
David
Wheeler
[3/4] from: cyphre::seznam::cz at: 8-Apr-2005 10:32
Re: [view][focus] Weird black line..
Hi Izkata,
That 'weird black vertical line' is text cursor ;) Use SOURCE focus to see
what is going on. Especially have a look at system/view/carret.
If you want really own custom key handling routine without the carret a
possible quick solution is(watch out line breaks):
view/new Disp: center-face layout [
Fiel: box 200x24 green with [
edge: [color: red effect: 'ibevel size: 3x3]
font: [name: {Papyrus} size: 12 color: black shadow: none align:
'left]
] feel [
engage: func [a b c][
if b = 'key [
either char? c/key [
append Fiel/text trim/head/tail to-string c/key
system/view/caret: none
show Fiel
system/view/caret: tail a/text
][
]
]
]
]
]
focus/no-show Fiel
do-events
If you wan to have the cursor displayed properly you have to write
appropriate system/view/carret handling code to your custom keyboard
handler.
regards,
Cyphre
[4/4] from: Izkata::Comcast::net at: 8-Apr-2005 6:17
Aaaand that works! Now to add something for focusing
on it when someone clicks on it...
I'm working on something I saw in the ComputerWorld magazine -
There was an article in the technology section on Biometrics,
so I decided to attempt the Typing Patterns part. But I couldn't
seem to managed changing 'field, so I decided to stick to this,
since I've previously gotten something similar to work.
-Happy Izzy Boy
PS - I typed "Hello!" into it twice, and timing using now/time/precise,
I got the -exact- same interval between the same characters each time!
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted