Page 1 of 1

set the backgroundpattern error

Posted: Sat Dec 06, 2014 4:20 pm
by vedus
i have a datagrid with 2 labels and 1 graphic (form)
i am using the switch to filter the data i get something like bellow

Code: Select all

   case "Liqueurs"
               put revQueryDatabase(sConnID,"SELECT rowid FROM datadrinks where cat like 'liq%' ") into sCursorID
               break
          case "noalco"
               put revQueryDatabase(sConnID,"SELECT rowid FROM datadrinks where cat like 'Non%' ") into sCursorID
               break
i want to change the graphic pattern of the rectangle that i have in the form so i try the bellow

Code: Select all

 set the backgroundpattern  of graphic id 1068 of group id "1012" of card id 1011 of stack "Data Grid Templates 1417794119370" to image id 1053 of card id 1002 of stack "images"
but always i get error
execution error at line 4 (Object: can't set object property), char 2
what i do wrong here?

Re: set the backgroundpattern error

Posted: Sun Dec 07, 2014 12:59 pm
by Klaus
Hi vedus,

you need to set this property (backgroundpattern) to a NUMBER or an expression that resolves to a number!
This: "...image id 1053 of card id 1002 of stack images" is not a number 8)

Try this:
...
set the backgroundpattern of graphic id 1068 of group id "1012" of card id 1011 of stack "Data Grid Templates 1417794119370" to 1053
...


Best

Klaus

Re: set the backgroundpattern error

Posted: Sun Dec 07, 2014 4:51 pm
by vedus
thank you klaus,fixed..