Yes, that was my initial thought also, but the problem is that the event never fires.
No matter how I resize the Display or the ProcessBook window, nothing happenes.
I'm not quite sure what the problem is - the Size event is supposed to fire on detection of the display being re-sized by the user. Can you please elaborate on what the exact issue is for you?
I want all the symbols in my display to be visible all the time and also fill all the available client area in the Processbook application, regardless of the size of the processbook window. For instance, if I or one of my colleagues resize or maximize the processbook window, I would like my display to zoom to "FitAll".
I set the Me.Zoom = "FitAll" in the Display_Open event, and that works as it should. But sometimes the Processbook application is not opened in a maximized state, and then when someone open the display in that book, the display would fit all symbols as it should for the current Processbook window size, but when the maximize button next to the Close button on the Processbook toolbar is clicked, the display won't be "FitAll" anymore. And this is the part where I would like Display_Size event to fire, so that I could also put the Me.Zoom = "FitAll code into that event to make sure the symbols in my display will once again make use of the whole client area in the Processbook window
Sadly, english is not my native language, so it is a bit hard to describe. Should my issue still not be clear, I will add some images
If possible, could you try for yourself if you can get that event to trigger. I am almost sure my company got the latest version of Processbook (2015 RC2 if i remember correctly), but still something of course could be broken with our software.
I just tried this out on my work PC, using ProcessBook 2015 R2 SP1, and had no problems making this work as expected. My code is as follows:
Private Sub Display_Open() ThisDisplay.Zoom = "FitAll" End Sub Private Sub Display_Size(ByVal lWidth As Long, ByVal lHeight As Long, ByVal lDeltaX As Long, ByVal lDeltaY As Long) ThisDisplay.Zoom = "FitAll" End Sub
This worked for me in the following scenarios:
1. ProcessBook application opens in maximised state, and display window opens in maximised state
2. ProcessBook application opens in maximised state, and display window opens in non-maximised state
3. ProcessBook application opens in non-maximised state, and display window opens in maximised state (within main application window)
4. ProcessBook application opens in non-maximised state, and display window opens in non-maximised state
Resizing either the application window or the display window caused the Size event to fire (and my display Zoom property to be updated) as expected.
Do you see the same behaviour if you open the display on a different PC?
Thanks for taking the time to do the research.
For some weird reasons, all new displays I made today triggered the Size event normally, in all the scenarios you listed, but none of my existing display, or displays made by other people, triggers the even in the same scenarios.
I don't know how to proceed with this, it's not that it's a deal breaker that I am unable adjust the zoom level, but surely it would be a nice feature to implement
1 of 1 people found this helpful
Ok, so I got an update on this.
Apperantly, Display's that are embedded into a Processbook won't fire the Size event, but stand-alone Displays will. So after I saved my Displays as individual files, the events started to work. Not sure if this is a bug in Processbook or not...