backgroundPattern

Klaus Major klaus at major-k.de
Mon Jun 14 06:41:05 EDT 2004


Hello hershbp at verizon.net,

> Hi ,
> How can I know what id# background a certain icon or back groud is ? 
> I'm trying to figure out the mac backgroundpattern is what # ?
> I did put the backgroundpattern of this stack in the message box it 
> came up 210091.
> What I want ,
> if the platfrom is "MacOS" then set the background to "the mac 
> background" else to "nothing".
> if I put
> if the platform <> "MacOS" then set the background to none , then it 
> is some kind of black background on the pc platform.
> Thanks

If i understand you right you want to set the backgroundpattern to "the 
mac pattern" on startup on your
standalone on the mac and NO pattern on other paltform(s)?

As you already learned the "pattern" is simply an image (it is the 
image id that you provide with the
"pattern" hanlder...) that is tiled...

And even the "mac background" is in this case an image with the id 
210091...

HINT: There is no "background" keyword in RR in THIS context!
You mean "backdrop" or "backgroundpattern" probably...?

You can use "backpattern" instead of "backgroundpattern", less typing 
;-)

So what you might be looking for is this one:

on preopenstack ## or whenever...
    ...
    if the platform = "MacOS" then
        set the backpattern of this stack to xyz
       ### the id of the image you want to have as a pattern...

    else
    ## windows or *nix
       set the backpattern of this stack to none
      ### will remove an eventually set pattern!
    end if
  ...
end preopenstack

The "else" case might not be necessary, but won't hurt ;-)

Hope that helps...


Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list