1. Sarath Pappireddy
  2. PowerBuilder
  3. Monday, 5 August 2019 17:12 PM UTC

I have requirement in power builder 2017 R3 to do some logic when there is change in frame bar position and enabling/disabling of frame bar.Can any one help me getting the menu item called or invoked when we do right click on "Frame bar" in to hide/disable the frame bar,change the position of the toolbar.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 6 August 2019 04:00 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Sarath;

   You would capture that in the "Toolbar moved" event at the window level.

FYI: Toolbarmoved

HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Friday, 9 August 2019 08:37 AM UTC


Hi Sarath;



Put this code in the MDI Frame's "OTHER" event, as follows ...



IF wparam = 3 THEN

Application lo_app

lo_app = GetApplication( )

IF lo_app.toolbartext = TRUE THEN

THIS.setmicrohelp ("ToolBar Text ON")

else

THIS.setmicrohelp ("ToolBar Text OFF")

END IF

END IF





Refactor the above code as required. ;-)

Regards ... Chris
  1. Helpful
  1. Sarath Pappireddy
  2. Friday, 9 August 2019 17:23 PM UTC
Hi chris,

I have tried and it works but for each and every click its calling,so because of that always my logic is executing for each click.for example when i right click on the frame bar even without selecting the option other event is getting triggered.is there anyway we can restrict like execute only when the option selected or we can make use of other events in mdi frame window?

why we are passing wparam =3 only here can you please explain ?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 9 August 2019 18:07 PM UTC
Correct. However, what I do is keep an variable with the current toolbar state & compare that to the application's toolbar text state. Only when the toolbar state changes compared to the variable do you need to action it.

HTH
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.