Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,226 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 2,335 people online right now. Registration is fast and FREE... Join Now!




Disable tab pages if one tabs progress bar is loaded / flush events of

 
Reply to this topicStart new topic

Disable tab pages if one tabs progress bar is loaded / flush events of, Progress bar

ashishsagarwal
13 Oct, 2008 - 08:45 PM
Post #1

New D.I.C Head
*

Joined: 20 Aug, 2008
Posts: 2

Hello,

I have a tabcontrol which contains tabpages. Each tab page take a while to load data for which i show a progress bar. [b] My issue here is while the progressbar is loaded user can click other tab and after completion of progress the control goes back to new tab selected. So i want to disable tabs till the progress bar is completed. I am using C# .net as code of my language.

I tried with options:

=> tabenabled = false - but it doesnot worked!!

Looking for a early positive reply.

User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Disable Tab Pages If One Tabs Progress Bar Is Loaded / Flush Events Of
13 Oct, 2008 - 08:58 PM
Post #2

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
Try using hte TabControl_Selecting Event()

csharp

private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
{
if (progressBar1.Value != 0 | progressBar1.Value != null)
{
e.Cancel = false;
}
else
{
e.Cancel = true;
}
}


Hope this helps
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:02AM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month