Announcement

Collapse
No announcement yet.

ComboBox ... What am I doing wrong ?

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

  • Lance Edmonds
    replied
    Actually, upon review, this is documented in the height parameter description for the CONTROL ADD COMBOBOX statement, but it is not overly emphasised.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Lance Edmonds
    replied
    Duely noted... thanks!

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • David Pratten
    Guest replied
    Request this detail to be included in the documentation.

    ------------------

    Leave a comment:


  • ian mcallister
    replied
    Thanks Lance!

    Leave a comment:


  • Lance Edmonds
    replied
    The problem is subtle... the height of a combobox must include the drop down portion of the box. Change the height parameter from 13 to, say, 113 and you'll find that it works fine.



    -------------
    Lance
    PowerBASIC Support
    ( mailto:[email protected][email protected]</A> )

    Leave a comment:


  • ian mcallister
    started a topic ComboBox ... What am I doing wrong ?

    ComboBox ... What am I doing wrong ?

    The help suggests that:
    items$() Optional dynamic string array containing the initial items to be displayed in the combo box. If the array is omitted, the combo box will be empty upon creation.

    So here's my code with the array but I can't get anything to appear in the combobox.

    What am I doing wrong ?

    Code:
    #COMPILE EXE
    
    #INCLUDE "win32api.inc"
    
    GLOBAL item$()
    
    FUNCTION PBMAIN()
    REDIM PRESERVE item$(3)
    
    item$(0) = "Item Zero"
    item$(1) = "Item One"
    item$(2) = "Item Two"
    item$(3) = "Item Three"
    
     CALL DialogOne
    
    END FUNCTION
    
    
    SUB DialogOne
    #REGISTER NONE
      DIALOG NEW 0, "ComboBox Test", , , 186, 44, &Hc80800& OR %WS_MINIMIZEBOX, 0 TO D1&
    
      CONTROL ADD LABEL,     D1&,  10, "What am I doing wrong ?"  ,   51,   5,  83,   9, 0
      CONTROL ADD COMBOBOX,  D1&,  20, item$()                    ,   47,  18,  91,  13, 0
    
      DIALOG SHOW MODAL D1&
      MSGBOX item$(3)
    END SUB
Working...
X