CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 1999
    Location
    UK
    Posts
    44

    Questions on Checkbox and SSTab controls

    I have a couple of things I can't work out.

    1) I want to use a checkbox as a means to display the status of a variable. I do not want the user to be able to change its state by clicking on it. I have tried setting Enabled=False, but this just greys out the control. I also tried to change the state back in the Click event handler, but that just causes a recursive Click event.

    2) I am using the SSTab control to provide a set of tabs. However I want to be able to select the active tab under program control and it does not seem to work.

    The MSDN help gives this example:

    private Sub Command1_Click()
    Form2.SSTab1.Tab = 1
    Form2.Show
    End Sub



    I have put this code in my form load (The tabs are on the first loaded form of my application):

    private Sub Form_Load()
    ' Other code first
    SSTab1.Tab = 0
    Show
    ' More code ...
    End Sub




    Thanks for any help,
    Mark

    Mark
    Regards

    Mark Rivers-Moore

  2. #2
    Join Date
    Oct 1999
    Location
    UK
    Posts
    44

    Re: Questions on Checkbox and SSTab controls

    Please ignore question 2 about SSTab. I have just found that the display is not updated until the end of Form_Load. I had expected the change to be immediate as I stepped through the code. When each thing failed, I took out the code again. I thought Show would bring up the form with everything up to date at that point. I expected SSTab.Tab to work immediately in the same way that ZOrder does.

    Question 1 still applies...

    Mark
    Regards

    Mark Rivers-Moore

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured