DougHennig / Ribbon

A Microsoft Office 365-like ribbon control for VFP forms
24 stars 11 forks source link

Trying to put this in _SCREEN #10

Closed CHamlinPNP closed 2 years ago

CHamlinPNP commented 2 years ago

đź“ť Provide detailed reproduction steps (if any)

  1. …I created a sample menu ... but rather than in a form ... I added it to _SCREEN
  2. …When the menu opens it looks good (not much there, just starting to play)
  3. …When I click on a button which bars under it. The bars appear and then disappear. If you watch very closely you can see them appear. So I know it is working...they just are not staying visible.
  4. ...I have attached a very simplistic example which shows the issue and then have attached a video trying to show what I am talking about. If you slow down the video ... you will indeed see the bars flash and disappear.

✔️ Expected result

I expect on clicking on button and the sub-menu (bars) appear below it. I then can click on one of these bars.

❌ Actual result

The bars and disappear almost immediately. You have to watch very closely to see them flash.

đź“· Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form

https://user-images.githubusercontent.com/34104227/159494771-7ec4ff9d-b0fd-476b-978a-c1f4f246fe2c.mp4

test.prg.txt

CHamlinPNP commented 2 years ago

I am still trying to figure this out. I have not heard anything in a few days. I do not know if this means that everyone is as confused as I why it does not work....has not been even tended to yet...or something else. I tried including all of the pertinent information in the first post. Please assist if you can. Please at least respond so that I know someone is working on it. Thanks

DougHennig commented 2 years ago

Given that this is volunteer work, responses aren't going to be the same as for commercial products. IOW, I haven't had a chance to look at it yet. Hopefully this weekend. In the meantime, try putting it in a form instead of _SCREEN.

Woody-Soft commented 2 years ago

IMHO, the reason is that you do have a READ EVENTS at the bottom, but nothing where those events can "land on". No form, no textbox, nothing. VFP needs some landing spot for keypresses, as long as a program runs. Thus maybe just _screen.add a textbox for that.

CHamlinPNP commented 2 years ago

I don't think this is the case though. It is a menu...and based on the menu it will do something. The initial view of the menu comes up as shown. Not making anything in particular as a "Landing Spot". You click on just a button...and it displays a message as it is supposed to do...you click ok on the messagebox and it returns to the read events with once again...no landing spot. The issue is that the sub-menu flashes which is bizarre...if it wanted a "landing spot" for this...why not make the sub-menu which was just drawn the location to go. There is just something that is making the sub-menu be released (probably due to the return from the routine which drew it). That is my guess...hopefuly Doug will be able to figure this out.

DougHennig commented 2 years ago

The issue is tmrClick.Timer in SFRibbonMenuForm. It closes the menu if the user clicks outside the form the ribbon belongs to, including clicking in _SCREEN. Since the ribbon is in _SCREEN, the menu will immediately close after opening.

The ribbon isn't intended to work in _SCREEN, so try putting it in a form. Otherwise, adjust the code in that method.

Doug