Now Im back, because I dont found the solution ???
I attached with this thread, a very little project that shows my problem...Cloud you try it please ?
I have a textbox (Text1) with a validate event. If this textbox is empty it's supposed to keep the focus and it's not the case because I can go to another TAB ? Why ? Is it normal or no ?
Thanks for your help !
DubweiserTM
If your question has been answered, you can mark a thread as resolved...
Just to be sure, I can erase this Text1_Validate(Cancel As Boolean) ???
I'm guessing at the functionality you want but no. My change only checks when you change to a different tab and not if you go to a different control on the same tab.
Using Lost_Focus cannot be a solution, though. That will defeat the purpose of validation.
it's quite interesting - running your project "as is" replicates the probles you described. However, replacing original tab control with new "fixes" the problem. And I couldn't find any discrepancies in the settings... Strange.
Using Lost_Focus cannot be a solution, though. That will defeat the purpose of validation.
it's quite interesting - running your project "as is" replicates the probles you described. However, replacing original tab control with new "fixes" the problem. And I couldn't find any discrepancies in the settings... Strange.
Im not really sur if I understand you ? I delete the TAB and I add a new one ? If its this I tried it and it's not okay..
DubweiserTM
If your question has been answered, you can mark a thread as resolved...
Im not really sur if I understand you ? I delete the TAB and I add a new one ? If its this I tried it and it's not okay..
Well, it is for me... So, it must be the control on your system. Did you install all service packs?
Or, perhaps you want to try using TabStrip control instead. It's not a container so you would have to use Picturebox or frame for each tab you create but it's better control over all and always prefer it to SSTab.
I'm sorry Rhino but I don't understand why you say that the "Lost_Focus cannot be a solution". I would expect that the Validate event would fire when the tab is changed but if it doesn't then what's the matter with checking the textbox value on the tab number change and if it fails validation then stetting focus to the textbox?
If Validate isn't fired (and it must) then there is something wrong with tab control itself because it doesn't fire validation. If I ddn't see it myself I wouldn't believe it... I haven't seen it before... And Lost_Focus is no substitution for the Validate (and visa versa)... Each event is important and has its purpose.
If Validate isn't fired (and it must) then there is something wrong with tab control itself because it doesn't fire validation. If I ddn't see it myself I wouldn't believe it... I haven't seen it before... And Lost_Focus is no substitution for the Validate (and visa versa)... Each event is important and has its purpose.
Interesting! The Label controls seem to be causing the problem. Remove them and everything works as expected.
The usual fix : use a Frame control on every Tab and put your controls in the Frame. Using Frames solves many quirks with the SSTab, including this one.
[Edit]
I just ran some more tests. It seems the problem occurs if there is at least one Label, Image, Line or Shape control anywhere on the SSTab (any Tab). I can't remember if I have VB SP6 installed on this pc. My versions are
Interesting! The Label controls seem to be causing the problem.
It's quite Interesting! I couldn't let go so I did the same thing - deleted both labels - and I can confirm that label control causes validate event not to fire when you switch between the tabs. But this is really insane - labels are not even windows (nor are the image, line or shape controls) !!!
Btw, frames don't help either - it must be something written within the tab control itself...
As I said earlier "If I din't see it myself I wouldn't believe it"...
Just another argument against using SSTab.
Strange... It didn't for me and I tried all kind of groupping on a single frame and/or multiple... no luck... It's no bother to me as I never use SSTab control (nor any control from infamous Sheridan controls library) but it's interesting enough because non-windowed control causes validation issues.
ditto, and is indeed one of the suggested work-arounds
No, it isn't for me so it is not the solution.
Solution (in my opinion) is to avoid using that control completely. It is convenient (because it's a container) but very buggy.