Panel

J

juan

I am having issues with SelectNextControl when there is a panel that contains
multiple controls that have tab stops. I played with the tabindex in the
editors and things still do not work. So in my constructor of my form I
forced tabindex of my panels, but then I get a warning VSD101 saying the
method is unsupported. But if I create a temporary control variable then it
is fine. Is this a compiler error?

// This compiles fine
Control tmpCtrl;
tmpCtrl = DSetBtnPnl;
tmpCtrl.TabIndex = 50;

// This gives the following warning
//warning VSD101: Members not supported by the device platform should not be
called: System.Windows.Forms.Panel.set_TabIndex is not a supported method in
this platform
((Control)DSetBtnPnl).TabIndex = 50;

Everything runs fine on the device. I figured if I casted the panel to a
control, it should treat it as a control.
 
D

dbgrick

The Panel control does not support tab index. The propety is overridden and
throw the not supported exception, so no matter the case, the control
property will always throw this exception.

Regards,
Rick D
 
J

juan

On Windows Mobile 5, it runs just fine and there is no exception thrown.
Actually setting this on the panel allows my tabbing to work and allows me to
move among all the controls using the "arrow" keys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top