I have a vatabpro control version 2.0.46 by Farpoint technologies in VB6 on a form.
In the form activate event some code is run to show and hide the certain tabs in the va tab pro control.
After this a normal option button on one of the tabs is set to true.
When the form is displayed all the radios on the tab are unchecked even though they were explicitly set in code and I can see this happening on a breakpoint.
I have a weird feeling i've seen this before and suspect it might be something to do with the vatabpro control and hiding tabs or switching between active tabs?
ok i found the answer, it's because the tabs are not treated as separate containers so radios in other tabs were unchecking my radio when they were being set. The solution is to nest the radios within a frame.
Related
I am creating a vb.net program in visual studio 2019 community. I have created a form with several buttons and group boxes. Within the group boxes are radio buttons and or Check boxes. The form also uses 2 custom controls. 4 instances of Custom control "A" is on the form at design time. Two instances of Custom control "B" are added at runtime and more can be added by the user with a button click. Note that custom control "B" has within it 4 instances of custom control "A".
The problem is when I run the program and press the tab key I do not get the expected behavior of focus moving to the next control. Nothing happens when tab is pressed. Pressing the tab key does nothing regardless of which control I give focus to.
I have set tab stop to true on all the controls I want to stop on. I have set the tab index values in the order I want.
Thinking maybe it has something to do with the custom controls...
I tried removing the code that adds custom control "B" at runtime so that no custom control "B" is on the form. That did not help.
In addition to removing control B I disabled all Custom control A. That did not help either.
Is there a setting somewhere that enables the tab button to work as expected?
What else should I be looking at?
Ok so this appears to be unrelated to the form. I failed to mention this is an add in for another program (Autodesk Inventor). I also failed to consider that inventor may be handling the tab key, which appears to be the case...
https://adndevblog.typepad.com/manufacturing/2012/05/handling-tab-key-in-inventor-net-forms.html
let me put it simple.
With Firefox 29,
I add a check box control next to the back & forward button in the toolbar "nav-bar".
It works. I mean I can do check and uncheck, and the javascript code will be triggered.
Now, my problem: after I checked the checkbox in one tab, I found that the checkbox in all other tabs are also checked, and if I uncheck any of them, the checkbox in all other tabs will be unchecked.
Why they change as one? I would like them to be unrelated or separated. In another word, I want the control (checkbox or button or label etc) to be tab-specific.
All suggestions are appreciated.
I have a complicated mess of code (built by a team of 7 over the course of several years) that incorporates multiple libraries - jQuery and angularjs, specifically.
I know that the value of a variable changes when I click a certain radio button, but I have no idea what is running when that happens to cause the variable to change. I've tried console.log in every place I can think of, but am somehow still missing the action that's changing the variable.
I know how to debug with Firebug if I know where to place my breakpoint, but in this case, I don't. Is there any way to tell Firebug to start debugging at the line that executes immediately after the radio button is clicked? In other words, when I click the radio button, open Firebug's Script panel to the first line in order of execution, wherever that line may be.
If you have chrome you can right click on the checkbox -> inspect element -> event listeners
Is there any way to tell Firebug to start debugging at the line that
executes immediately after the radio button is clicked?
Yes, this feature is called Break On Next.
Note that Firebug has much more features to debug your scripts besides setting breakpoints within the Script panel. These features are described in the 'Script Debugging' page inside the Firebug wiki.
Furthermore the Watch side panel allows you to inspect the variable to see, at which step it is changed.
My application is context-sensisitve and I dynamically build menus for the main window / context/popup, and other places. I typically know if a given menu command will be valid given the current state of the application. Is it better practice to DISABLE/GREY the menu options which currently do not apply OR since I'm generating the menu anyway, OMIT them entirely?
The application is a Java/Swing is anyone is curious. The question seems GUI toolkit agnostic but may be platform dependent.
The old apple guidelines say to Disable for fixed menus (in the menu bar), and omit for context menus.
I guess the motivation is that a context menu is supposed to only show options that are available to the particular context, and the main menus are supposed to show all commands, so the user knows where "Save" would be even if it's not selectable at the moment.
For right-click menus, I'd say that if the item is applicable to what was right-clicked but is for some other outside reason unavailable, disable it. If it is not applicable to the right-clicked thing then hide it as there's no chance of it ever showing up. Case in point:
When I right-click on the background area of this page in Firefox the first four items are Back, Forward, Reload, and Stop. Forward and Stop are disabled because they aren't valid actions right now (I have no forward history and the page is not loading anymore). These four guys are very consistently offered, they are expected, global, often-used commands. They are the four main "navigation" controls and by default they have toolbar counterparts (in the form of big dedicated buttons).
However, if I right-click on an image, I get completely different options in the context-menu all related to viewing, saving, and copying the image under where I clicked. These options don't appear at all (not even disabled) under normal use because they are very specific to what I right-clicked on. When right-clicking on the background area, Stop and Forward, while currently not valid actions, are still applicable to what I clicked on (the page) but they are unavailable for other reasons...
Like the rule for menus on the top menu bar, the goal is not to surprise users with commands suddenly appearing for, from the user's point of view, inexplicable reasons.
I'm using an old version of Visual Studio that provides only the 'interactive' method for setting tab stops. Is there anyway to clear all the tab stops before setting them? Or anyway to exclude a given control from having a tab stop?
Added 10-sept-2009
Part of my problem was confusing tab stop order and tab stops. I naively assumed setting tab stop order, set a tab stop hence much confusion. Thanks for pointing out that tab stops are set in the property box.
You are not clear about your specific VS version, but as far as I remember (back to VC6) you automatically assign the tab order if you simply click once on each control in your desired order. There is usually no need to reset them beforehand.
This hint from a VC6 tutorial might be helpful:
To adjust the tab order of your
controls, you can choose the Tab Order
command from the Layout menu and click
the controls in the order that you
want them to be tabbed. If you have a
complicated dialog box and only want
to change the tab order of a few
controls, you can take a little
shortcut by holding the Ctrl key down
and selecting the last control that
tabs properly before selecting the
controls that tab incorrectly.
Clicking an empty spot in the dialog
box, or pressing Enter, will exit the
tab order mode.
To prevent a control from being
reached using the Tab key, clear the
Tab stop checkbox on the control's
property page.
If you want to change the tab behaviour programmatically, look for the WS_TABSTOP windows style.
Open the dialog whose tab order you want to change. Press Ctrl + D. On the dialog you will see numbers next to each control which indicate the tab order for that control. Click the controls in the order you want the tab order to go.