Announcement

Collapse
No announcement yet.

Checkbox text won't wrap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Checkbox text won't wrap

    I'm trying to set a DDT checkbox to multiline without much
    success. I set the control width small enough so that all
    the text won't show on one line and also used the %BS_MULTILINE
    style in the CONTROL ADD CHECKBOX statement.

    However, no luck. I'm starting to wonder if I have some weird
    video driver issues (see my other post about "Both Option Buttons
    On"), but the checkboxes work fine in other Win apps and in VB.

    Any ideas? Thanks!

    ------------------
    Mark Newman
    Mark Newman

  • #2
    Code:
       #Compile Exe
       #Register None
       #Dim All
       #Include "Win32Api.INC"
    
       Function PbMain
          Local hDlg As Long
          Dialog New 0, "Test", ,, 100, 100, %WS_CAPTION Or %WS_SYSMENU To hDlg
          Control Add Button, hDlg, -1, " 1. " + $CRLF + " 2. ", 10, 10, 80, 30, _
              %BS_AUTOCHECKBOX Or %BS_MULTILINE Or %WS_VISIBLE Or %WS_CHILD
          Dialog Show Modal hDlg
       End Function
    ------------------
    E-MAIL: [email protected]

    Comment


    • #3
      Thanks Semen!

      Your sample code works, but I don't understand why I can't do
      this with the CONTROL ADD CHECKBOX statement. Is this a Windows
      issue or a DDT problem?

      Anyway, many thanks for the help!


      ------------------
      Mark Newman
      Mark Newman

      Comment


      • #4
        Here - DDT.

        With buttons a question is not so obvious.
        1) Not DDT - it simply execute SendMessage ... BM_SETCHECK
        2) Windows - also question, because MSDN talks simply
        An application sends a BM_SETCHECK message to set the check state of a radio button or check box.
        No one word about WS_GROUP options.


        ------------------
        E-MAIL: [email protected]

        Comment


        • #5
          Mark;

          Regarding the WS_GROUP style...

          First time you use WS_GROUP style when creating your controls starts the grouping,
          the second time you use WS_GROUP style to create another control marks the end of that group.
          The next control created with WS_GROUP starts the next grouping of controls etc.

          Regards,
          Jules


          Comment


          • #6
            I have the six CONTROL ADD OPTION... statements consecutively,
            with the 1st, 3rd and 5th ones with the %WS_GROUP option and
            the buttons work fine in the UI.

            I was under the impression that Windows itself didn't allow
            multiple option buttons within a group to be TRUE, but that
            seems not to be the case.



            ------------------
            Mark Newman
            Mark Newman

            Comment

            Working...
            X