How To force to stay in a tabpage

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

First, I thank you Herfried.

I have 3 tabpages in a tabcontrol.
I would like to force the user to stay in the current tabpage until he
doesn't correctly fill some textboxes.
I know how to prevent bad entries but if I click onto another tabpage, I can
leave the current tabpage.
I try to use the select property but it doesn't work.
Any idea ?

Stan
 
Hi Stan,

I don't know if Herfried is the only one who should answer, but when not,

I think I would just make a routine that is like this in the
tabcontrol.click event.
(not really tested)
private tabpageready as integer = 99
\\\
if tabpageready = 99 then
tabpageready = tabcontrol.selectedindex
else
tabcontrol.selectedindex = tabpageready
end if

And then in every tabpage when it is ready set tapageready to 99.
///

Just a thought

Cor
 
* "Stan Sainte-Rose said:
First, I thank you Herfried.
Why?

;-)

I have 3 tabpages in a tabcontrol.
I would like to force the user to stay in the current tabpage until he
doesn't correctly fill some textboxes.
I know how to prevent bad entries but if I click onto another tabpage, I can
leave the current tabpage.
I try to use the select property but it doesn't work.

This code shows how to detect when the selected tab changes:

<http://www.google.de/[email protected]>
 
Back
Top