locked
Visual Studio MFC dialog application , tab control RRS feed

  • Question

  • I created a tab control application in MFC dialog.

    I found a way to disable tab control.

    There are four tabs for tab1, tab2, tab3 and tab4.

    tab1 is enable.

    tab2 is disable. (Mouse cannot click)

    tab3 is disable. (Mouse cannot click)

    tab4 is enable.

    Monday, June 29, 2020 6:29 AM

Answers

  • I created a tab control application in MFC dialog.

    I found a way to disable tab control.

    There are four tabs for tab1, tab2, tab3 and tab4.

    tab1 is enable.

    tab2 is disable. (Mouse cannot click)

    tab3 is disable. (Mouse cannot click)

    tab4 is enable.

    Hello,

    I think you ask how you can disable tabs.

    Have you tried to use tab2.EnableWindow(FALSE) to disable the tab?

    If this doesn't work, that means that you can still mouse click the tab, then you could try one of the following:

    - do not show tab2
    - catch select tab2 clicked (e.g. in tab2.SetActive ) and select tab1 again
    - disable all controls in tab2 (the tab can be clicked but no action can be done)

    Regards, Guido

    • Marked as answer by gsegria Monday, June 29, 2020 8:46 AM
    Monday, June 29, 2020 7:44 AM

All replies

  • What is your question?
    Monday, June 29, 2020 7:00 AM
  • I created a tab control application in MFC dialog.

    I found a way to disable tab control.

    There are four tabs for tab1, tab2, tab3 and tab4.

    tab1 is enable.

    tab2 is disable. (Mouse cannot click)

    tab3 is disable. (Mouse cannot click)

    tab4 is enable.

    Hello,

    I think you ask how you can disable tabs.

    Have you tried to use tab2.EnableWindow(FALSE) to disable the tab?

    If this doesn't work, that means that you can still mouse click the tab, then you could try one of the following:

    - do not show tab2
    - catch select tab2 clicked (e.g. in tab2.SetActive ) and select tab1 again
    - disable all controls in tab2 (the tab can be clicked but no action can be done)

    Regards, Guido

    • Marked as answer by gsegria Monday, June 29, 2020 8:46 AM
    Monday, June 29, 2020 7:44 AM