Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8733895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:44:23+00:00 2026-06-13T09:44:23+00:00

I have a tab control with some dialogs as tab pages, I have a

  • 0

I have a tab control with some dialogs as tab pages, I have a button in each of them that creates the next tab, those buttons are set as default buttons, so when I press enter key it goes to next tab. but, after you press those buttons, they become disabled, and when you go back to that tab it doesn’t allow the client to click on next button again, the problem is that when I press enter when the buttons are disabled and are not default buttons any more, the tab pages get closed!
It seems enter closes the dialogs! but when I change the tab and come back to that tab again, dialog is showed again!So it means enter does not destroy or close that dialog!

Dialog when the button is enabled.Pressing enter is like clicking on the button:
enter image description here
Same dialog after it creates the next tab:
enter image description here
Pressing enter when the next step button is disabled!
enter image description here
The Dialog after changing the tabs and comming back to that tab again!
enter image description here

I don’t understand it’s behavior! Notice that I didn’t wrote anything for enter button, I just set those buttons as default button, and even when those buttons are not default buttons, it happens!what should I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:44:24+00:00Added an answer on June 13, 2026 at 9:44 am

    The default action for dialogs (i.e. what gets called when you press enter, if the focus is not in another button or control that captures enter) is to call OnOk, and by default, OnOk closes the dialog.
    So you have to override the dialogs’ OnOK function and give them an empty body:

    void CMyTabDlg::OnOk()
    {
        // Nothing, so it does not close the dialog
    }
    

    Also, you can set the default button to some other button, but I would do the override OnOk thing anyway, just to be safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tab-control that has 4 tab pages. Each tab page contains a
I have a tab control in my WPF application with multiple tabs. Each tab
I have created a tab control and few forms. Each form opens in a
Problem I have a custom tab control using Chrome-shaped tabs that binds to a
I have several forms added to the pages of the tab control via tabcontrol.tabpages.controls.add
I have a complex WPF control that for some reasons (ie. performance) is not
I have a tab control with a data template that renders data based on
I want to create a Tab Control that only opens content once. Each item
I created a simple tab control that has 2 tabs (each tab is a
I would like to have a webpage something like windows tab control. Each webpage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.