A view to remember, a sunset by the lake.
Thursday, July 23, 2009
Tuesday, July 07, 2009
vb.net Radiobutton TabIndex problem
I spend 8 hours trying to understand why my dynamically GUI in VB2005 didn't work as expected if I selected a radiobutton ctrl (On/Off) it would set it to On (tabindex=0 for the On button).
If I had more than one (ON/Off) button created it would only set the first to On.
Its due to that VB set focus on the ctrl with tabindex=0 and if the radiobutton get focus it will generate a CheckedChanged event!
Made the same test in VB6 here it works as expected, if you got 2 radiobuttons on a form the on checked will get the focus and not the first in tabindex.
Workaround: Add a button to the form, set tabindex=0, height=1 and width=1.
Now when the form is created the focus will be on the invisible button.
Test the bug:
Create a form with 2 radiobuttons Rb1 and Rb2, check Rb2 radiobutton.
If I had more than one (ON/Off) button created it would only set the first to On.
Its due to that VB set focus on the ctrl with tabindex=0 and if the radiobutton get focus it will generate a CheckedChanged event!
Made the same test in VB6 here it works as expected, if you got 2 radiobuttons on a form the on checked will get the focus and not the first in tabindex.
Workaround: Add a button to the form, set tabindex=0, height=1 and width=1.
Now when the form is created the focus will be on the invisible button.
Test the bug:
Create a form with 2 radiobuttons Rb1 and Rb2, check Rb2 radiobutton.
Subscribe to:
Posts (Atom)
MySQL to MariaDB
Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...
-
When converting an VB2008 application to VB2010 I run into trouble regarding COM objects while compiling. you get errors like: Error 1...
-
In a module you have declared a Structure or Enum that you will use through out a project. Module Module1 Public Structure dummy ...
-
Apache2 crashes on Ubuntu Linux 22.04.5 after Zabbix was updated to 7.0.26 During a upgrade of my Ubuntu server there was a new package for ...
