I'm looking at the best way to get the current slide in the active presentation.
The documentation says that when you are in a NormalView (ActiveWindow.View.Type = pptNormalView) you can access the current slide with ActiveWindow.View.Slide.
The problem with this approach is that when the user clicks on slides preview pane (left pane), and the focus goes between two slides (see the picture) the ActiveWindow.View.Slide cannot be reached, it throws a null pointer exception.
Is there a way to access the current slide in any case?
Thank you, F.
Related
I have a window which shows a table on the left half. On the right half I display properties of the item which is selected in the table. The user can now change these properties.
The properties are represented by different kinds of controls: textFields, sliders, numberSteppers and popUpButtons.
The user can - besides using the mouse - use the tab key to navigate through the UI Elements. When the table has the focus tab will select the first editable item on the right side, then tab walks through the items and after the last item will go to the table again.
When the table has focus and I change the value of a popUpButton or move a sliderthe default behaviour of the API (Apple's Cocoa) is to change the value but keep the focus on the table.
My intuition would tell me that after changing a control element it should have the focus (i.e. become firstResponder). But I checked some of macOS' preference panes and they behave similarly.
In Apple's Human Interface Guidelines I do not find mention of that specific topic.
So my question is:
Is there a guideline or at least best practice an app should follow regarding if a control element like a popUpButton or slidershould get the focus when clicked or edited?
If you have a folder sorted by a certain column, and then you click and drag the vertical scrollbar, Explorer will display a little helper rectangle showing where in the sort list you currently are. This is what I'm talking about:
I was wondering if anyone knew how to obtain a handle or UIAutomation ID of that little rectangle (if one exists). So far I've been trying with Spy++ and Inspect, but I can't seem to figure it out (in part because the rectangle is fleeting and disappears as soon as you lift the mouse button). Thank you for any response or guidance.
"I am trying to implement https://github.com/luke-chang/js-spatial-navigation on the webos multiple lists if one list is finsihed after i click on the TV remote right navigation the foucs is going to next list but i want to stop the right focus on once user reaches the last item of the list but it should work on left and top and bottom focus"
I can't understand your problem either. From my experience the horizontal row is limited by the TV screen width and once you hit the last item in the row the right arrow keys doesn't work, but I'm not familiar with webos. I've had good success adding fading context text that appear when a item is focused and a changing hero graphic too. Check out http://loopzine.tv/firetv.htm
D-pad or keyboard with arrow keys required.
first off, I'm very new to using API's so please bear with me I'm on a steep learning curve !
I'm creating an application using Silverfrost Fortran FTN95.
I've been trying to initiate the opening of an initial Window within the program which uses the whole screen
useable area (the so-called WORKAREA in API parlance) but am having a problem.
Having used GET_WINDOW_LOCATION# API function within my Fortran code to obtain the dimensions and origin of the max possible area for
the window (without taskbar), I've then defined the 'origin' of the window to be at -n,-n where the border is n pixels thick and I've
increased the window dimensions by (2xn) in each direction so that the other 2 borders will be off-screen at top or under the taskbar at the bottom edge).
Anyway, I'm having difficulty obtaining exactly the same as produced via clicking the 'MAXimise button' on a window.
While the window produced itself seems to occupy the whole area available, when it appears the CAption appears right on the upper edge of the
CAption ba(i.e. not centre justified vertically).
Also, the MINimise, MAXimise and CLOSE buttons in top rh corner of window do not fill the whole depth of the CAption bar (they're about half the depth and indeed appear to be cut-off).
If I subsequently click the window 'MAXimise button' after initial window creation then the CAption and buttons re-align themselves correctly.
This is all illustrated in this image here:-
http://s1164.photobucket.com/user/john_pbucket/media/SilverfrostForumsImageFiles/MAXWIN-Summary_zpscajfx3vx.png.html
Note - I first created the full window with borders within the available screen area (this is the first example shown) where the window Border (8pix wide) is visible
The subsequent attempt to create the window as per the MAXimise button places the window at origin (-8,-8) and I increase the window dimensions by 16 (2xborder width) in each direction in order to get the borders off-screen, but thy're still there.
So, What series of Windows API commands should I be using exactly to get the window to open in a correctly maximised state, and are there any 'subtleties' of alignment and/or spacings I should be aware of which may be causing this problem?
I guess the question boils down to 'what sequence of API commands does the window MAXIMISE button execute ?' but I can't find an answer anywhere.
Maybe there are also some subtleties I need to know about with regard to any windows dimensions parameters which could be creating the anomaly ?
Any help/guidance would be appreciated. Thanks
My powerpoint is made is like a quiz, one slide has a question and 4 answers (buttons with text, not numbers) that can be clicked on. When an answer is clicked on, it is linked to another slide that explains if the answer being right/wrong and then adds/subtracts points from the score.
Currently what I have done is a simple macro that each button is linked to and upon clicking any of the 4 answer buttons, it will go to a certain slide and show a pop up box with their current score.
What I want to do is have either a text box or some object that holds the score throughout the entire presentation and ideally if possible, the score resets when the ppt is closed or opened but the running score is the most important aspect I'm trying to hammer down.
Is this possible for what I'm asking? Let me know if there are any details that would help
Instead of resetting the score when the presentation shuts down, do it at startup. For example, you could put a "Begin the quiz" button on the first slide, have it reset the score, then move to the next slide.
As to where to store the score, there are a number of ways of doing it. One would be to put a rectangle or text box on the last slide and store the score as its text. Make sure the rectangle's sent to back so it's the first shape on the slide, or change Shapes(1) below to indicate the actual z-order position of the shape.
Function SetScore(lScore as Long)
Dim lLastSlide as Long
lLastSlide = ActivePresentation.Slides.Count
With ActivePresentation.Slides(lLastSlide).Shapes(1).TextFrame.TextRange
.Text = Cstr(lScore)
End With
End Function
A companion GetScore function should be easy to come up with, similar to the above.