Home » Developer & Programmer » Forms » visual attribute not working runtime
visual attribute not working runtime [message #627446] Wed, 12 November 2014 02:29 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

1)Created Visual Attribute MY_COLOR and Bag ground color is RED
Changed Property of Visual Attribute Group as MY_COLOR and selected color is RED
When-new-item_instance on MGR Column
set_item_Property('EMP.MGR',VISUAL_ATTRIBUTE,'MY_COLOR');

At runtime form is opened and the color automatically selected RED on MGR Field.

and It is Multi Record Block , After Execute_query out of 10 , i am getting 5 Rows , but why i am getting all the 10 Rows?

I need at the Runtime, can you please help me is this process is correct?

Thanks
Re: visual attribute not working runtime [message #627447 is a reply to message #627446] Wed, 12 November 2014 02:36 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
I made sample form , i need the effects at runtime.
Please check the attached FMB file.
  • Attachment: MODULE2.fmb
    (Size: 40.00KB, Downloaded 1298 times)
Re: visual attribute not working runtime [message #627459 is a reply to message #627446] Wed, 12 November 2014 02:49 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
mist598 wrote on Wed, 12 November 2014 08:29

and It is Multi Record Block , After Execute_query out of 10 , i am getting 5 Rows , but why i am getting all the 10 Rows?



I have no idea what this sentence means.
Re: visual attribute not working runtime [message #627461 is a reply to message #627459] Wed, 12 November 2014 02:55 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks for reply cookiemonster,

I mean i have multi block record( no of records 10), after execute Query i am getting 5 record out of 10.

Why the red is applied for 6-10 records?
/forum/fa/12279/0/
and FRM-41011-Undefined Attribute also
  • Attachment: image1.png
    (Size: 14.97KB, Downloaded 3127 times)
Re: visual attribute not working runtime [message #627464 is a reply to message #627461] Wed, 12 November 2014 03:11 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Because that's what set_item_property does. It affects all occurrences of an item on the form.
If you want to affect individual occurrences then you need to use set_item_instance_property.
Re: visual attribute not working runtime [message #627465 is a reply to message #627464] Wed, 12 November 2014 03:20 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Set_Item_Instance_Property( 'DEPT.DEPTNO', CURRENT_RECORD, VISUAL_ATTRIBUTE,'MY_COLOR'); 

I used the above code in the trigger , it is giving me same action.

Is this code effects at the runtime?

Why the Deptno Field shows me RED Color before(after the form open)

Re: visual attribute not working runtime [message #627466 is a reply to message #627465] Wed, 12 November 2014 03:24 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Did you remove the set_item_instance call from WNFI?
Re: visual attribute not working runtime [message #627467 is a reply to message #627466] Wed, 12 November 2014 03:26 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,
Quote:
Did you remove the set_item_instance call from WNFI?

Yes i removed and used the below code
Set_Item_Instance_Property( 'DEPT.DEPTNO', CURRENT_RECORD, VISUAL_ATTRIBUTE,'MY_COLOR'); 
Re: visual attribute not working runtime [message #627468 is a reply to message #627467] Wed, 12 November 2014 03:30 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
That code will set the first occurrence of deptno to my_colour
Re: visual attribute not working runtime [message #627470 is a reply to message #627468] Wed, 12 November 2014 03:36 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
That code will set the first occurrence of deptno to my_colour

Yes, i need only how many deptno's are displayed in the canvas, i don't want to see the Color for empty records in the Deptno column.

And why the color is not effecting? i mean it is effected before, but we can do without visual attribute right? I mean we can change the field baground color right?

please explain me if i did any wrong
Re: visual attribute not working runtime [message #627471 is a reply to message #627470] Wed, 12 November 2014 03:55 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
mist598 wrote on Wed, 12 November 2014 09:36

And why the color is not effecting? i mean it is effected before, but we can do without visual attribute right? I mean we can change the field baground color right?


Again, I'm not sure what this means.
Re: visual attribute not working runtime [message #627472 is a reply to message #627471] Wed, 12 November 2014 04:02 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

why the color's are applied to the deptno column at the form opened. So we can do without visual attribute right? i mean we can add property of color item

Re: visual attribute not working runtime [message #627473 is a reply to message #627472] Wed, 12 November 2014 04:13 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Are you asking if you can set background colour directly?
Previous Topic: Code to activate the desired sheet excel file
Next Topic: Database table Trigger
Goto Forum:
  


Current Time: Wed Apr 24 12:25:14 CDT 2024