Targeting Paint tools at a specific grouped image

Mike Doub Mike at Doub.com
Sun Oct 23 19:05:29 EDT 2005


Hello all,

I am trying to create a set of controls that is made up of a few fields and
an image.  I am doing this inside of another group that is set up to manage
the scrolling.  I must be doing something wrong as any time I go to edit the
image a new image is created the same size as the card. 

Here is the jist of my script where i is the name of the control being
created passed in from an outer loop:

  create group i in group "+scroll"
   
  create field "Name" in group i
  set the width of it to 80
  set the height of it to 16
  set the topleft of it to the topleft of graphic "scrollarea"
  set the opaque of it to false
  set the showborder of it to false
  put i & ":" into field "Name" of group i
  set the textstyle of it to "bold"
  set the textalign of it to "left"
   
  create field "Skill" in group i
  set the width of it to 80
  set the height of it to 16
  set the topleft of it to the bottomleft of field "Name"
  set the opaque of it to false
  set the showborder of it to false
  set the textalign of it to "right"
   
  create image i in group i
  set the showborder of it to true
  set the width of it to (MonthCount * monthwidth)
  set the height of it to (SkillCount * monthheight)
  set the topleft of it to the topright of field "Name" of group i
   

-- everything works fine up to here

  set the itemdel to comma
  put the topleft of it into xy
  put item 1 of the topleft of it + 1 into tr_x
  put item 2 of the topleft of it + 1 into tr_y
  choose rectangle tool
  set the filled to true
  set the penColor to "white"
  select image i of group i
  drag from tr_x,tr_y to tr_x+monthwidth,tr_y+monthheight
-- this drag seems to be the one creating the unwanted image
  set the filled to false
  set the penColor to "black"
  drag from trx,try to trx+monthwidth,try+monthheight


Can someone explain to me how to go about editing a specific image and not
having this overlay image being created?

Thanks
  Mike






More information about the use-livecode mailing list