Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Bug FYI (2002)

  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bug FYI (2002)

    The Windows Forms object TabControl disables the entire control (all tabs)
    if you disable any single tab. Gotta be a bug.

    Just thought I pass that on.

    Actually, it looks like there isn't an Enable property for tab pages. Humm.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Kevin,

    Being new to VB.NET (a week and a half or so), can you give an example of this.

    Here's what I tried and couldn't reproduce the bug:

    Created a new TabControl on a form, and added 2 tab pages. Placed a label and button on each page. Then added 2 buttons on the form itself. The buttons on the pages just pop up a simple message box, just to prove to me the page is not disabled.

    Then in the click event of one of the buttons on the form I added the follwong code:

    Me.TabPage1.Enabled = False

    which disabled the first tab, I could switch to and from it, but couldn't click on the button, but the button on the second page still worked.

    Then in the click event of the second button I added the following code to reenable the tab:

    Me.TabPage1.Enabled = True

    This renabled the tab and the controls on the tab.

    This is what I expect would happen. Not for you? Or did I miss the point of you post entirely, being the .NET newbie I am ?
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    That sounds like VB to me. And that's as it should be. Maybe the Windows forms are
    different in the C# world. My tab pages don't even have an Enabled property.

    I appreciate your helping flesh this thing out. And I'm not much further ahead with
    .net than you. So, this is a mutual discovery society...
    Attached Images Attached Images
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Well, here is some more to add to the mutual discovery society:

    Since I have never looked at C# until now, I created a new C# Window APplication, and did the same thing as my VB.NET test (Tab strip with two pages, a command button on each page and two buttons on the form)

    Then in the click event of the two buttons on the form I added the following code:

    tabPage1.Enabled = false;

    and

    tabPage1.Enabled = true;

    Well, this worked to [dis|en]able tab page 1, depending on the button.

    Neither Intellisense nor the property page list Enabled as a property, but when you type the tabPage1. intellisense kicks in and I got an EnabledChanged event showing.

    So, one wonders why there is an EnabledChaged event, but no easily visible Enabled property of the TabPage.

    So, yea it looks like there is a bug in there somewhere.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Dear Fellow MDSer (Woody's gonna think there's an uprising...),

    I'll try again. I think may have programmatically attempted to change tabs
    and got very weird results. I'll post back.

    Thanks for investigating.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Kevin,

    I'm glad to look. It gives me exposure to c# that I normally wouldn't have.

    Based on your original post, though, I would think that you are disabling the entire tab control and not a specific sheet.

    Loyal Order of MDS <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    I'll post back as soon as I get the VSS database moved to a new server (some
    housekeeping going on here), and can test, but for now look at the sig line at this <post#=229027>post 229027</post#>.

    Look what you started... <img src=/S/innocent.gif border=0 alt=innocent width=20 height=20>
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  8. #8
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    <img src=/S/salute.gif border=0 alt=salute width=15 height=20> <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Brian,

    Does a disabled tab page display grayed out and non-clickable?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  10. #10
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    I'm not sitting at a PC that has .NET on it, but I don't think it was greyed out.

    I think it just disabled all the controls on the page.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  11. #11
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    I discovered that the statement

    this.tabpagePage1.Enabled = false;

    will compile and execute, but it does absolamente nada!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  12. #12
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Kevin,

    Do you have the latest .Net Framework installed?

    I just tried it and it works fine for me. Here is a screenshot of what I get when I use:
    <pre>this.tabpagePage1.Enabled = false ;</pre>

    Attached Images Attached Images
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  13. #13
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Also, here is a zip of the C# project that I have been testing with. Maybe you can see what we are doing differently.
    Attached Files Attached Files
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  14. #14
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    Ah, I see now that we are not on the same (tab) page!

    You ARE disabling controls on the tab page. I'm trying to
    disable the ENTIRE tab page while keeping it visible.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  15. #15
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bug FYI (2002)

    OK. Yep we were on different pages (and hopefully Charlotte doesn't venture in here <img src=/S/pun.gif border=0 alt=pun width=22 height=18> <img src=/S/grin.gif border=0 alt=grin width=15 height=15>)

    It would be nice if it worked the same way as VBA. Maybe we just aren' trying the right combinations, being new at C# and all.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •