1. Jonas Blomgren
  2. PowerBuilder
  3. Thursday, 12 September 2019

Hello
I am trying to change the toolbar backcolor in a menu from script.
I inherited the frame menu to a new name and changed the toolbar color,
and when using changemenu in the MDI window the original color is still there,
the menu itself changed ( have different menu text on 1 item)
But if i open a sheet and close it, the new toolbar color is showed...
Changing toolbar color in the sheet i can not figure out how to do.
Is this a bug or am i missing something ?
Attached a PB19 example to show my point.

Thanks

/Jonas

 

Attachments (1)
Who is viewing this page
Accepted Answer
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Jonas;

  Yes, the MDI Frame seems to be the issue. I redid my test using my framework's OrderEntry demo App, as follows:

Before Change Menu...

After Change Menu...

After OpenSheet...

  Looks like the MDI Frame is definitely interfering with the Menu's Toolbar!

I would like to suggest that you open a Support Ticket for this issue.

Regards ... Chris

Comment
Thank you Chris for confirming, i will report this on monday, have a nice weekend

/Jonas
  1. Jonas Blomgren
  2. Friday, 13 September 2019
There are no comments made yet.
  1. Friday, 13 September 2019
  2. PowerBuilder
  3. # Permalink
Jonas Blomgren Accepted Answer Pending Moderation
0
Votes
Undo

This is how it behaving in a MDI application

The problem is Toolbar Color, Menu Color seems to work.

also in a SDI application toolbar Color is working fine after a ChangeMenu()

 

Comment
There are no comments made yet.
  1. Friday, 13 September 2019
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Jonas;

    Test ...

Original

ChangeMenu

Works OK for me!

Regards ... Chris

Comment
Chris,

Are you using a mdi in your screen shot?
  1. Jonas Blomgren
  2. Thursday, 12 September 2019
No .. that is a MAIN window type.
  1. Chris Pollach
  2. Thursday, 12 September 2019
my problem occurs in a mdi app, can't get it work as showed in the attached pb19 example app...
  1. Jonas Blomgren
  2. Thursday, 12 September 2019
There are no comments made yet.
  1. Thursday, 12 September 2019
  2. PowerBuilder
  3. # 2
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Jonas;

   You cannot do that in any PB version as the background colour property in the menu object is "write protected". I have no idea why Sybase never addressed this PowerSoft restriction. 

:-(

Regards ... Chris

Comment
Hello Chris

ChangeMenu() does not work, atleast not toolbar color...

  1. Jonas Blomgren
  2. Thursday, 12 September 2019
You can set the Toolbar Colour in the Menu Painter. Thus a ChangeMenu() on a new Menu Object class would work. Note: You need to change both the MenuBackColor and ToolBarBackColor properties to be consistent (colour wise).
  1. Chris Pollach
  2. Thursday, 12 September 2019
That was exactly what i did, don't work...
  1. Jonas Blomgren
  2. Thursday, 12 September 2019
There are no comments made yet.
  1. Thursday, 12 September 2019
  2. PowerBuilder
  3. # 3
  • Page :
  • 1


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