realbasic-nug
[Top] [All Lists]

ImageWell Must Have PICT?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: ImageWell Must Have PICT?
From: Don Lavelle <lavelle2 at optonline dot net>
Date: Tue, 30 Jul 2002 14:23:57 -0400
Hi,

I was doing something with an image well, when I found this code didn't work:

b = SelectColor(c, "Select fill color.")
if b then
  fillColorD = c
p = NewPicture(imageWellFill.width, imageWellFill.height, Screen(0).depth)
  p.graphics.ForeColor = c
  p.graphics.FillRect 0, 0, imageWellFill.width, imageWellFill.height
  imageWellFill.image = p
end if

p is a legit picture though. I can set Self.backDrop = p an (ugly but) correctly drawn window.

I checked the reference and it says than the .Image property is the "Picture displayed in the ImageWell. Picture musy be a PICT."

I'm doing something with fill patterns and fill colors, á la AppleWorks.

So how can I cram a home-made solid-color picture into an image well? =)

TIA,
  Don



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