A quick response...

One simple way to have an image appear after the layout has been shown would be 
to include it in the original layout and change its offset to -100x-100 (or 
whatever's required to stop it being visible) before the layout is shown.  Then 
when you want to show the image just change its offset again - and the image 
too, if required.

Hope that's useful, and within the ballpark of what you're wanting to do...

-- Carl Read.


On Wednesday, 1-October-2008 at 2:45:35 Alan Macleod wrote,

>Is there a way to append an image object (a box for example) to a face that
>has already been displayed. I'm looking to get  simple highlight
>functionality in an app in which a string is scanned for in a series of text
>faces. 
>
>I've been able to highlight the search word in each face but if I click in
>any of the text faces the face looses the highlight effect sort of like
>loosing focus on normal highlighting. 
>I would like the highlight to remain until no longer needed
>
>What I got working:
>
>rebol []
>pad: 20x30
>window: layout [
>       bx: box red 0x0
>       panel: panel [
>               text 400 "Here is a simple example how to use DRAW dialect
>for into alpha channel of the image. I think with the function make-alpha
>(bellow in the example) you can draw almost any kind of transparent shape
>though it is not the fastest method....IMO the possibility to use DRAW pens
>for alpha channel should be done at Rebol's native level"
>               t: text 400 "Here is a simple example how to use DRAW
>dialect for e-alpha (bellow in the example) you can draw almost any kind of
>transparent shape though it is not the fastest method....IMO the possiinto
>alpha channel of the image. I think with the function make-alpha (bellow in
>the example) you can draw almost any kind of transparent shape though it is
>not the fastest method....IMO the possibility to use DRAW pens for alpha
>channel should be done at Rebol's native level"
>               text 500 "can draw almost any kind of transparent shape
>though it is not the fastest method....IMO the possibility to use DRAW pens
>for alpha channel should be done at Rebol's naHere is a simple example how
>to use DRAW dialect for into alpha channel of the image. I think with the
>function make-alpha (bellow in the example) you can draw almost any kind of
>transparent shape though it is not the fastest method....IMO the possibility
>to use DRAW pens for alpha channel should be done at Rebol's native level"]
>
>button "Highlight" [foreach face panel/pane [if face/style = 'text [
>       system/view/focal-face: face
>       system/view/highlight-start:  find face/text "into alpha channel of
>the image"
>       system/view/highlight-end: find/tail face/text "into alpha channel
>of the image"
>       show face
>       ]]]
>button "Paint" [foreach face panel/pane [if face/style = 'text [
>       keyword: "transparent"
>       xy: caret-to-offset face find face/text keyword
>       bx/offset: face/offset + pad + xy 
>       bx/size: as-pair (5.9 * length? keyword) 15
>       show face
>       ]]]
>
>]
>view window
>
>-Alan Macleod

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to