locked
background colour RRS feed

  • Question

  • Please tell me. Is this correct?

    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><UserInterfaceMacro For="Text308" Event="OnClick"><Statements><Action Name="SetProperty"><Argument Name="ControlName">Text308</Argument><Argument Name="Property">BackColor</Argument><Argument Name="Value">Fundal 1</Argument></Action><Action Name="SetProperty"><Argument Name="ControlName">Text308</Argument><Argument Name="Property">Value</Argument></Action></Statements></UserInterfaceMacro></UserInterfaceMacros>

    I use this macro and all the time "Fundal 1" colour become automaticaly Black colour.


    Gheorghe Zibileanu mobile 0040740999006

    Wednesday, March 23, 2016 11:19 AM

Answers

  • I have solved other way:

    I just put to set back color property to be equal with color of other text which is white background color, and on click event I put macro to change color to black. Is working this way.


    Gheorghe Zibileanu mobile 0040740999006

    • Proposed as answer by Angie Xu Friday, April 1, 2016 6:37 AM
    • Marked as answer by David_JunFeng Friday, April 1, 2016 9:22 AM
    Wednesday, March 30, 2016 7:47 AM

All replies

  • >>>Please tell me. Is this correct?

    According to your description, could you help us figure out what "Fundal 1" colour is, I have made a sample to set TextBox's BackColor property, refer to below:
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
    <Action Name="SetProperty">
    <Argument Name="ControlName">Text0</Argument>
    <Argument Name="Property">BackColor</Argument>
    <Argument Name="Value">#000000</Argument>
    </Action>
    </UserInterfaceMacros>

    Thursday, March 24, 2016 7:32 AM
  • Fundal 1 is white colour. 

    Gheorghe Zibileanu mobile 0040740999006

    Tuesday, March 29, 2016 7:46 PM
  • Actually, I would like to have a text box white background To see the black message, then when I click on it to change the backgroung colour to black so I cnnot see anymore what I will write inside. Is like a password written on black background. But I cannot use your HTML code. I need the interface, so just update 2010 Access program please.

    Gheorghe Zibileanu mobile 0040740999006

    Wednesday, March 30, 2016 6:22 AM
  • Hi, sannikolas

    According to your description, I have reproduced this issue, this workaround is that you could use SetLocalVal to set RGB color value, refer to below code:
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
    <UserInterfaceMacro For="Text0" Event="OnClick">
    <Statements>
    <Action Name="SetLocalVar">
    <Argument Name="Name">Fundal 1</Argument>
    <Argument Name="Expression">RGB(255,0,0)</Argument>
    </Action>
    </Statements>
    </UserInterfaceMacro>
    </UserInterfaceMacros>
    
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application">
    <UserInterfaceMacro For="Text0" Event="OnClick">
    <Statements>
    <Action Name="SetProperty">
    <Argument Name="ControlName">Text0</Argument>
    <Argument Name="Property">BackColor</Argument>
    <Argument Name="Value">=[LocalVars]![Fundal 1]</Argument>
    </Action></Statements>
    </UserInterfaceMacro>
    </UserInterfaceMacros>

    In addition you could submit any feedback to User Voice:

    https://access.uservoice.com/

    Thanks for your understanding.
    Wednesday, March 30, 2016 6:26 AM
  • Second code is good, but first one is giving red spot alarm into expression field.

    Gheorghe Zibileanu mobile 0040740999006

    Wednesday, March 30, 2016 7:22 AM
  • I have solved other way:

    I just put to set back color property to be equal with color of other text which is white background color, and on click event I put macro to change color to black. Is working this way.


    Gheorghe Zibileanu mobile 0040740999006

    • Proposed as answer by Angie Xu Friday, April 1, 2016 6:37 AM
    • Marked as answer by David_JunFeng Friday, April 1, 2016 9:22 AM
    Wednesday, March 30, 2016 7:47 AM
  • Congratulation, thanks for your sharing your solution, that will help community member when they have same issue.
    Friday, April 1, 2016 1:24 AM