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
> ----- Original Message -----
> From: "Izkata" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 08, 2005 4:19 AM
> Subject: [REBOL] [view][focus] Weird black line..
>
>
> >
> > 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
> >
> >
> > --
> > To unsubscribe from the list, just send an email to
> > lists at rebol.com with unsubscribe as the subject.
> >
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.