Button in PowerPoint that only works in presentation / slideshow - vba

I am creating a presentation and I wish to create a button that works inside the presentation but also outside the presentation/slideshow. I wanted some unique things so I basically used a label as a button instead of a button, because I didn't want a frame around it and I didn't want to spend the extra 10 seconds in changing it around more or less. The button is working fine while within presentations but outside if I click it I only select the label itself.
I tried changing the type of button but it didn't work.
I would like the button to work inside the presentation and outside of it.

Related

Dynamically create views containing buttons - what about constraints?

I want a menu (hidden on the left side of my app) with a variable amount of buttons (depending on the user). I took the app over from another developer and he manually added every view and every button and it is a pain to maintain if you want to add another button in between or change something. So I want to redo it automatically.
But how can I achieve that? Let's say i have on the left x views, each containing an image, a button and a separator (to the button below). So I basically only create one single prototype view, button combo and reuse it for all other buttons. But how do I arrange them so the constraints are correctly set?
I would go with a table-view. Setup a cell with an image and a button, separators come for free in a table-view. Make sure the cell has a delegate for the button call-back or a closure to handle the button tap.
Add a controller/manager to control the number of views based on the user.

NSTextField in statsbar menu becomes unresponsive after clicking outside the menu

I'm building a statusbar menu using custom views, and everything seems to work fine except for text fields. The first time I open the menu, everything works fine. If I close the menu by clicking the statusbar icon again, it also continues to work fine.
If I close it by clicking outside the menu, however, the next time I open the menu the text fields will be completely unresponsive. I can sometimes highlight the NSTextField, and even make the "itemEdited" event happen.
Any ideas on this weird issue? Buttons put on the same view work fine.
I've made a sample project to demonstrate the problem: https://github.com/Nic0S/NSTextField-bug

Button in UserControl in main page not reacting to pointer in Windows Store apps

To share a common display layout in a Split template Windows Store app, I put a Back button, title TextBlock, and another button in a UserControl, and then use that control in most of my pages. My problem is that in the main page, neither of the buttons will react to pointer activity, be it pointer over or clicking. However, it works fine in any other page. To isolate it, I created a blank app and duplicated the UserControl, but it works in that case.
How can I debug this?
Thanks.
-John
In an "ItemView" page of a "Split" template app, the Grid containing the back button and title must be below the GridView and ListView in the XAML code. Apparently the GridView, with no Grid.Row, and a Grid.RowSpan="2" needs to overlay the first and second rows, and if the button is beneath the GridView, it must assume it is not visible and doesn't need to respond to events. I moved my new user control instance to below the GridView, and the buttons work now.
This whole scheme of overlaying both rows makes no sense to me, but without the Grid.RowSpan="2", the items don't split nicely into two rows for me. I think such odd layout should have a comment explaining it in the template. Perhaps it could save someone else from this same kind of issue.

xulrunner tab close button

I have an xul window with a tab box. The tab and tappanel elements are generated as needed in Javascript.
I want the tabs to have a close button. The docs for the 'tabs' tag talks about a 'closebutton' attribute buts says it is no longer supported.
I am trying to create content inside the tab. Right now it contains two label tags. The first is the actual tab label and the second is a red X (actually unicode \u2716). It displays fine but I cannot seem to get an event to fire when the X is clicked.
I have tried using the onclick attribute and closebutton.addEventListener('click').
I also tried using a toolbarbutton instead of a label. It displays the X but does not draw the button around it when the mouse hovers. Most importantly I cannot get the button event to fire.

How do I properly move a scrollview when assigning a first responder?

I have a form in a UIView which consist of multiple textfields, couple of textviews and two fields that are interacted with by the means of an invisible button overlaid on them. When you click on a textfield, the keyboard pops up for text entry and I added a toolbar on it for navigating to the previous and next data entry (whatever the data entry is, be it a textfield, textview or one of the two special cases that are interacted with a button). Now, when I navigate with between textfields with those buttons everything works fine. My scrollview's content moves along the element that becomes the firstresponder (with the help of a piece of code from stackoverflow that scrolls the view while taking into account the height of the keyboard that hides a good portion of it). Here is a visual example.
The problem arises when I want to switch out of a specific data entry (date) that interacts with a hidden button. I'll give some context first. Those data entries show datepickers (one for the date, another for the time) in action sheets, and those action sheets also have navigating button in a toolbar, like so.
The code from stackoverflow that readjust the view do so in the didBeginEditing delegate methods of the textfields and textviews, so when I assign them first responder the scrollview adjust itself while taking into account the keyboard.
This means that, in the case that I switch into a special data entry, I manually move the scrollview's content so I can view the next element. When I switch from a special entry into a textfield I assume that the previously mentioned code from stackoverflow kicks in and adjust the view. It actually does when I move from the hour data entry (which uses a datepicker in an actionsheet) into the next element which is a textfield. However, when I'm at the date data entry (which is directly before the hour data entry) and press previous to assign the first responder to the textfield above it, the scrollview goes way ahead the text field, like so.
What's important to note is that this problem only occurs when the textfield is not in view. This makes me suspect that I'm incorrectly using the code that readjust the view. For instance, there is a constant in the code that represents the height of the keyboard. I tried changing it from 216 to 260 (so it takes into account my toolbar added on top of the keyboard) but this results in strange black artifacts near the buttom that only occasionally appears.
I'm kind of lost in this bug, and my post is already pretty long. I've prepared an example of my problem in a new project, if any of you could take a look into it I'd be very appreciative.
Here it is