His buttons emulate a keyboard, and contain an Arduino Teensy (only 0.7″ by 1.2″), which is a USB based AVR microcontroller. These photo booths are powered by Sparkbooth, which can automatically upload the photos to Facebook, Twitter, tumblr or other social media sites. Among other applications, these USB buttons can be used as the shutter control of Mac powered Photo booths at public events. He has freely helped tens of people create their own buttons, but is now able to fulfill requests for preassembled units. I was inspired by the open source work of Pete at RasterWeb! and his recent effort to bring “ The Button” to a wider audience of busy or non-makers. The Critic measures 3″ by 2″ by 2″ tall, and was designed to fit conveniently within arm’s reach, beside your keyboard or mouse. The Critic is an indispensable tool for use when the document you’re editing is just so full of errors that your fingers begin to ache from holding down the delete key. At that point, the safety cover can be lowered, thereby deactivating the device. When connected to a computer via the convenient USB plug, it will begin to delete text, continually deleting until all the (presumably erroneous) text preceding the curser has vanished. everything.This is “The Critic.” It’s the USB accessory version of a red pen: Once armed by rotating the red safety cover up, the device is activated by simply flipping the toggle switch. I'll get back to it when I know more about. I'd rather have some public functions and event handlers dealing with it but it's getting too complicated for me. Right now I'm more concerned about the amount of click and lost focus events. visible one because on lostfocus events I was getting an error saying the control was still active so it couldn't make it not visible. It would be better to loop through the textboxes right before saving the form and clear values of invisible and/or disabled controls from the collection. Probably not a good idea to clear the data at this point because misclicks may happen. So on click events I call this : Private Sub ClickToggles() Thanks to Andre's answer the second part was easier than I thought. My guess is that I would need to make a public sub where I set a collection of pairs of buttons and text fields based on their tags (there are other controls in my form that need to be left alone) and names, but I'm not sure how, I'm a beginner in VBA.Īny suggestions please ? - Edit step 2. I also feel like it would be better to loop through each pair of controls (text + button) instead of each control in both collections.īasically, I'm wondering if it would be (1) better and (2) possible to have something as simple as this : Private Sub OnLoadToggles(Collection of pairs) Making the distinction between text boxes and buttons in the procedure seems weird, I feel like it should be done prior so that I don't have to do it in every procedure. 'Every button has the same name than the textbox + "b"Įverything works well so far, but I'm not sure that's the best way to do it and I figured I would need to repeat some lines in step 2. Private mcolGroupBuToggle As New CollectionĪnd on Form_Current event, I call that : Private Sub OnLoadToggles(mcol As Collection, pcol As Collection) So, when the form is loaded, I call this : Private mcolGroupTxToggle As New Collection So far I've achieved the first step by setting two collections of controls based on some examples I found online. If the text field associated with it is empty, then the focus is set on it and the toggle button gets pressed (and stay that way if a value is entered in the text field, otherwise everything gets back the way it was, invisible and unpressed).If the text field associated with it has a value, then this field gets cleared (and invisible) and the toggle button gets de-pressed.If a text field is empty, then it is not visible and the toggle button isn't pressed.If a text field has a value, then it is visible and the toggle button.To make it more user-friendly, I want to associate each field to a toggle button. Those fields are all optional, the user can fill in any number of dates. In an Access form (2010), I have a set of text fields meant to contain dates. I know the title is a bit confusing so let me make myself as clear as possible.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |