Home » Developer & Programmer » Forms » Changing the background color of the visual attribute property
Changing the background color of the visual attribute property [message #186905] Thu, 10 August 2006 02:12 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Hii all

I want to change the background color of the visual attribute property

i use this
	SET_VA_PROPERTY ('CG$MANDATORY_ITEM',BACKGROUND_COLOR,'white');


so that when i run the form all the item that are holding the visual attribute 'CG$MANDATORY_ITEM' will take the white color

i use it in When_New_Form_Instance trigger but
there is no effect

is there any problem in it



Thanks for Everyone helped and helping me

[Updated on: Thu, 10 August 2006 02:14]

Report message to a moderator

Re: Changing the background color of the visual attribute property [message #186912 is a reply to message #186905] Thu, 10 August 2006 02:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I don't think there is colour 'white'. Try something like this
SET_VA_PROPERTY('VA', BACKGROUND_COLOR, 'R255G128B0')


David
Re: Changing the background color of the visual attribute property [message #186914 is a reply to message #186905] Thu, 10 August 2006 02:22 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

I tried your color but it doesnot and doesnot work for any color

Re: Changing the background color of the visual attribute property [message #186917 is a reply to message #186914] Thu, 10 August 2006 02:26 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Put it in a Post-Query trigger and see what happens.

Another test, create a display item and a button. In the When-Button-Pressed trigger put test into your test item and run your set_va_property command against it also.

David
Re: Changing the background color of the visual attribute property [message #186919 is a reply to message #186905] Thu, 10 August 2006 02:38 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

I created a new form and made as you said
and it work fine now

but on my exiting forms it doesnot work
Re: Changing the background color of the visual attribute property [message #186921 is a reply to message #186919] Thu, 10 August 2006 02:48 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Then we are not doing it in the right trigger. What happens if you put it in the Post-Query trigger? How about the Pre-Block trigger? Maybe the Pre-Text-Item?

David
Re: Changing the background color of the visual attribute property [message #186923 is a reply to message #186905] Thu, 10 August 2006 02:54 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

no i think the when_new_form_trigger is the right place and it worked fine on the new form

but in my existing forms that i want to implement this method on it is not working may be because i am using libraries that may change in the attribute values

is there any way can lock change in item property pallete
Re: Changing the background color of the visual attribute property [message #186924 is a reply to message #186923] Thu, 10 August 2006 03:07 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
To your last question - I don't think so.

The WNFI worked for your test form because there are no other triggers. In your 'big' form, there are other triggers. What you need to do if find where the visual attribute is changed and put your stuff after it.

By the way, why are you trying to change the colour? Can't you either change the colour of 'CG$MANDATORY_ITEM' in the object library, or change the object class of the item away from 'CG$MANDATORY_ITEM' to something else?

David
Re: Changing the background color of the visual attribute property [message #186926 is a reply to message #186905] Thu, 10 August 2006 03:12 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

because I want to globalize it according to every user
each user wants his own colors

Re: Changing the background color of the visual attribute property [message #186928 is a reply to message #186926] Thu, 10 August 2006 03:21 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Typical.

David
Re: Changing the background color of the visual attribute property [message #186957 is a reply to message #186905] Thu, 10 August 2006 05:21 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Now it run so fine
on my existing forms

i solved the problem
after that line code is place in the When_New_Form Trigger
i go to the property pallete of the items that will have that effect and choose another visual attribute and then return back to the past one and after that the form run right
!!!!!!!!!!!!!!!!!!

i don't know why is it something like refresh

and is there no way else to solve this issue
do i really must pass on all the fields on all forms and make to them refresh
Re: Changing the background color of the visual attribute property [message #187099 is a reply to message #186957] Thu, 10 August 2006 21:24 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
How about you build your own object library, inherit everything except 'CG$MANDATORY_ITEM' from the standard object library and have your own 'CG$MANDATORY_ITEM' as a local object then you should be able to change it.

You could also rebuild every form but copying the object library instead of inheriting from it.

You could also tell the users 'No, I have too much other meaningful work to do', or give them a quote for future maintenance of their personalised colour schemes of $100,000 per year and ask for 3 years funding up front.

David

[Updated on: Thu, 10 August 2006 21:25]

Report message to a moderator

Previous Topic: Magnatic Encoder
Next Topic: Search for a file pattern
Goto Forum:
  


Current Time: Mon Dec 05 14:42:17 CST 2016

Total time taken to generate the page: 0.20777 seconds