Creating a mtext dialog box to place text

Discussion in 'AutoCAD' started by Eugene, Jun 23, 2004.

  1. Eugene

    Eugene Guest

    Hello,
    I want to add the ability to underline my mtext in a my custom mtext
    editor...why doesnt the code below work?

    Private Sub tbUline_Click()
    If tbUline.Enabled = True Then
    tbMtxt.Font.Underline = True
    Else
    tbMtxt.Font.Underline = False
    End If
    End Sub

    By default underline is off. If you click the underline toggle (toggle on)
    it underlines the text in the textbox. If you then click the underline
    toggle again (toggle off) it continues to underline. When debugging the
    click it shows "tbUline.Enabled = True" in both cases, toggled up or down.
    Am I using .Enabled incorrectly?

    acad 2000i
    winXP

    Thanks in advance,
    Eugene
     
    Eugene, Jun 23, 2004
    #1
  2. Eugene

    MP Guest

    ..Enabled means a control is not greyed out and inactive
     
    MP, Jun 23, 2004
    #2
  3. Eugene

    MP Guest

    well, more exactly, means a control is not inactive - it can be checked or
    unchecked or data entered in it...depending on the control of course

    usually one will 'grey out' an inactive control to indicate to the user that
    it is not .Enabled
     
    MP, Jun 23, 2004
    #3
  4. Eugene

    Eugene Guest

    Thanks for the reply MP. So how do I check to see if it is toggled on or
    off?
     
    Eugene, Jun 23, 2004
    #4
  5. Eugene

    Eugene Guest

    Sorry...I'm alittle slow ;) ........ .Value does the trick.
     
    Eugene, Jun 23, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.