cancel
Showing results for 
Search instead for 
Did you mean: 

XML - Form Color

Former Member
0 Kudos

Hi,

My Form has different color then the SBO form.

What statement do I need in my XML form to follow the users selection of color?

Thank you,

Rune

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hello Rune,

you have to manipulate the screenpainter XML file.

i answered this in past

[Form Color|]

regards

David

Former Member
0 Kudos

Hi David!

But I need a method to check the color the user has selected and change the the color code to be the same in my form.

I need to find the color code and update the color code.

Could you seend me a email RBrattas @ forgestik . com?

color="0"

Thank you,

Rune

Nussi
Active Contributor
0 Kudos

Rune,

mail with description is on the way ..

see you in your mailbox

lg

David

Former Member
0 Kudos

I Like to change :

color="0" // 0 Combined

to

color="7" // 7 Orange

If the customer change his color; my form change color.

I need a method to test if the customer has change the colors

Nussi
Active Contributor
0 Kudos

ok Rune,

it's like in the email - get the information from the OUDG table (field color)

and extend your LoadFromXML function.

as you see i have a Replace in there - please extend the function.

the variable newvalue should contain the new color.


    private static void LoadFromXML(string FileName)
    {
        System.Xml.XmlDocument oXmlDoc = null; 

        try
        {
            oXmlDoc = new System.Xml.XmlDocument();

            // load the content of the XML File
            string sPath = null;
            sPath = System.IO.Directory.GetParent(Application.ExecutablePath).ToString();

            oXmlDoc.Load(sPath + "\\" + FileName);

            // load the form to the SBO application in one batch
            string sXML = oXmlDoc.InnerXml.ToString();
            sXML = sXML.Replace("color=\"0\"", "color=\"" + newvalue + "\"");
            globals.SBO_Application.LoadBatchActions(ref sXML);
        }
        catch (Exception er)
        {

        }
        finally
        {
            oXmlDoc = null;
            GC.Collect();
        }

    }

much luck - i believe in you

David

former_member201110
Active Contributor
0 Kudos

Hi Rune,

If you remove the color property from the XML file when you create it then the form colour will always be the same as the system forms.

Kind Regards,

Owen

Former Member
0 Kudos

Cool!

That was easy!

Done, I can start the weekend!

Answers (0)