1. Géza Bartha
  2. PowerBuilder
  3. Tuesday, 4 June 2019 07:26 AM UTC

Hi!

 

My question is how to modify the MenuBackColor property of menu object dynamically. The menu is contemporary!

We would like to one menu but two appearance. How to do it?

 

Sincerelly

Geza

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 4 June 2019 17:49 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Geza;

    Normally, it should be something like this ...

menu        lo_menu
lo_menu    =    menuid
lo_menu.menubackcolor = rgb ( 200, 200, 200 )

   However, the MenuBackColor property is "read only" - so you cannot change it at run time. You could perform a ChangeMenu() command but then you would have to have a suite of menu objects in different colour patterns. Most impractical IMHO.

  For the life of me, I have no idea why Sybase ever made that property "read only".  :-(

Regards ... Chris

 

 

 

Comment
  1. Roland Smith
  2. Tuesday, 4 June 2019 18:07 PM UTC
Somehow a word with the letters L, A, Z, and Y in it comes to mind.

  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 5 June 2019 03:31 AM UTC
  2. PowerBuilder
  3. # 1

Still, if you only have t wo menues, why NOT have two separate menus fully built - and then you can swap them at runtime.


Olan

 

Comment
  1. John Fauss
  2. Wednesday, 5 June 2019 04:44 AM UTC
Only Geza can clarify because it is not clear from his original post, but I think that he is wanting to set the MenuBackColor property on individual, selected menu items, not the entire menu structure. I agree with Chris - it makes no sense why this property is read-only.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 4 June 2019 17:49 PM UTC
  2. PowerBuilder
  3. # 2

The MenuBackColor property is write-protected and can be set only in the Menu Painter and then only the topmost-level menu item.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.