Color Change

PremPrem Member Posts: 34
edited 2006-01-30 in Navision Attain
Hi Friends

I would like to change the Color of the Main Menu based on the Companies selected. any one with any suggestions pls..? :?:

Cheer's

Prem

Comments

  • Dean_AxonDean_Axon Member Posts: 193
    Hi Prem,

    Easiest way I can think of is this:

    Create a new "Shape" (as per the "beige" in attain).
    Set the "BackColor" to the color you want.
    Set "Visible" to NO
    Set the "Name" to the color of you have chosen (i.e. Green,Yellow,Red etc...)

    Place this new shape OVER the current "beige" setting.

    Repeat the above steps for the amount of companies that you have.

    then write the following code in the OnAfterGetRecord() trigger:

    if COMPANYNAME=A then
    Currform.Beige.Visible(True);
    if COMPANYNAME=B then
    Currform.Green.Visible(True);
    if COMPANYNAME=C then
    Currform.Yellow.Visible(True);

    You must remeber to set the property of the current shape ("Beige") to NO otherwise this will always show.

    Hope that helps.

    Dean
    Remember: Keep it simple
  • kailoukailou Member Posts: 14
    I think rather than in onaftergetrecord the code should be in onOpen trigger. because the companyname is not changing here
  • Dean_AxonDean_Axon Member Posts: 193
    I think rather than in onaftergetrecord the code should be in onOpen trigger. because the companyname is not changing here

    True :oops: ,
    But the delay would not be noticable so i didn't think it mattered too much???
    Remember: Keep it simple
  • PremPrem Member Posts: 34
    Hi Friends

    Thanks for ur Reply but this is not the solution which i am looking for... i had done this already... what i want is that the user would like to change the color of the company as they wish... i mean give them the option of the 9 colors and may be on the company info they can choose it..

    Cheer's

    Prem
  • Dean_AxonDean_Axon Member Posts: 193
    okay, not too difficult.....

    Create a new table with an option field for your chosen colors and change the table property "DataPerCompany" to NO....

    Create your primary key as "Company"

    On whichever trigger you decide to use :wink: the code would look something like this....

    CompanyColors.Get(COMPANYNAME); //Defined as global to the newly created table
    if CompanyColours.Color=beige then
    Currform.Beige.Visible(True);
    if CompanyColours.Color=Green then
    Currform.Green.Visible(True);
    if CompanyColours.Color=Yellow then
    Currform.Yellow.Visible(True);

    Easy :wink:
    Remember: Keep it simple
  • MagnoMagno Member Posts: 168
    don't even need to change the datapercompany, just store it in the company information
    There are no bugs, only random undocumented features...
    ---
    My Blog: http://NAV-Magno.be
  • RobertMoRobertMo Member Posts: 484
    and you could include a check when validating selected color on company information, if some other company has already choosen that color.

    (unless you want to alllow that some companies has the same color)
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  • trintrin Member Posts: 110
    Hi,

    Can anyone tell me how to change the Navigation Panel color on 4.0? Or is there a way to have a different color wallpaper/scheme per company?

    Thanks,
    Trin
  • ara3nara3n Member Posts: 9,256
    You can't do much with the 4.0 Navigation Panel. It sucks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.