S
Steve Amey
Hi all
I want to be able to prevent a particular tab from being selected at
run-time, how would I go about doing that?
At the moment, I have created a custom control and inherited the TabControl.
I then override the WndProc method and trap the WM_NCHITTEST message (I
don't know if this is the correct message to watch out for).
I need to check to see if the tab that they are clicking on is Enabled or
not (Eg. TabPage1.Enabled = False) and if the Enabled is False then I want
to ignore the message so the tab doesn't change, otherwise forward the
message on as normal.
Am I going about it the right way or is there a better way to do this??
Kind Regards,
Steve.
I want to be able to prevent a particular tab from being selected at
run-time, how would I go about doing that?
At the moment, I have created a custom control and inherited the TabControl.
I then override the WndProc method and trap the WM_NCHITTEST message (I
don't know if this is the correct message to watch out for).
I need to check to see if the tab that they are clicking on is Enabled or
not (Eg. TabPage1.Enabled = False) and if the Enabled is False then I want
to ignore the message so the tab doesn't change, otherwise forward the
message on as normal.
Am I going about it the right way or is there a better way to do this??
Kind Regards,
Steve.