API - alphabetically sorted and editable combobox for my PropertyManagerPage??!!

Discussion in 'SolidWorks' started by KimSky, Sep 24, 2003.

  1. KimSky

    KimSky Guest

    Hi,

    Can someone please help me understand the combobox function for the
    PropertyManagerPage...

    I would like to have the combobox editable and the text sorted
    alphabetically... acc. to SWX API help one should use the enumerations
    specified in the swconst.bas file, where it says

    Public Enum swPropMgrPageComboBoxStyle_e
    swPropMgrPageComboBoxStyle_Sorted = &H1
    swPropMgrPageComboBoxStyle_EditableText = &H2
    End Enum


    Therefore I'm now (without any luck) trying this code before showing my
    PropertyManagerPage

    pComboBoxDrawnBy.Style = swPropMgrPageComboBoxStyle_Sorted
    pComboBoxDrawnBy.Style = swPropMgrPageComboBoxStyle_EditableText
    pPropertyManagerPage.Show

    I managed to get the alphabetical sorting right and the combobox is in fact
    editable but for some reason editing the combobox won't call the
    function/sub PropertyManagerPage2Handler_OnComboboxEditChanged as the SWX
    API help says it will....

    Private Sub PropertyManagerPage2Handler_OnComboboxEditChanged(ByVal ID As
    Long, ByVal Text As String)
    Select Case ID
    Case DrawnBy
    MsgBox Text
    End Select
    End Sub


    I'm stuck with this problem and at this point all the "work-arounds" I can
    think of are both difficult and "ugly"....

    Ideas someone??!!...

    TIA,

    KimSky
     
    KimSky, Sep 24, 2003
    #1
  2. KimSky

    Heikki Leivo Guest

    Public Enum swPropMgrPageComboBoxStyle_e
    Again, this swPropMgrPageComboBoxStyle_e is a bitmask (you can recognise it
    from &H (hex) and from the values (1, 2, 4, 8, etc.), and it is always
    mentioned in SW Api help). You have to either add the values together or use
    bitwise Or operator to make the flags work together:
    swPropMgrPageComboBoxStyle_EditableText

    Hope this helps!

    -h-
     
    Heikki Leivo, Sep 24, 2003
    #2
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.