realbasic-betas.mbox
[Top] [All Lists]

Re: Tile window background?

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: Re: Tile window background?
From: Jon Johnson <jonj at realsoftware dot com>
Date: Sat, 29 Jun 2002 09:37:33 -0500
If you want to put in a feature request, use REALbugs. However, for the current time being, do this:

Create a property "myBackdrop as picture"

in the window's open event:

  dim x,y as integer

  myBackdrop=newPicture(me.width,me.height,32)

  for x = 0 to me.width-1 step sourcePicture.width
    for y = 0 to me.height-1 step sourcePicture.height
      myBackdrop.graphics.drawPicture sourcePicture,x,y
    next
  next

  me.backdrop=myBackdrop


Also, if your window is resizeable, just put the same code found above in the resized event.

-Jon

On Saturday, June 29, 2002, at 12:03  AM, Richard Nicolella wrote:

Hi,

I need to give a window a small backdrop pattern, and have it "tile" to fill
the entire window without flickering. The window.backdrop property works
well, but the picture doesn't tile.

I wonder if a BackdropDrawMode as integer property might be a good idea for
future RB versions.

The effect could be selected by setting bits:

none - normal
bit 1 - tiled horizontal
bit  2- tiled vertical
bit 3- stretch horizontal
bit 4 - stretch vertical

This would come in handy for so many of my windows.


---
Subscribe to the digest:
<mailto:realbasic-dr-digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-dr-off at lists dot realsoftware dot com>




<Prev in Thread] Current Thread [Next in Thread>