Results 1 to 2 of 2

Thread: Combo box empties upon leaving click_event.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Quantico, VA, USA
    Posts
    41

    Post

    Allright, here's the problem. In a activex control, i modify the text property of a combo box. this modification is triggered by a procedure call from a property set subroutine in the control. When stepping through, the data appears in the control up to the point that the end of the clicked event is reached (aka. the End Sub). then, when that is stepped over, the data dissappears. if you have any ideas, please let me know.

    ------------------
    To err is human, but to apologize frequently is embarassing.

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Quantico, VA, USA
    Posts
    41

    Post

    FYI: I solved the problem I posted earlier. In a combo box, you cannot change the .text property from the clicked_event if you clear the list portion in the clicked event as well. ie.

    Public Sub combo1_clicked()
    combo1.clear
    'data is an array of strings
    for i = 0 to ubound(data)
    combo1.additem data(i)
    next i
    combo1.text = "TestData"
    End Sub

    the result is:
    1. list gets cleared
    2. list gets repopulated
    3. text gets set
    4. when sub ends, text gets cleared

    i don't know why this happens. if someone wants to explain why, please let me know.

    Chuck Sweet

    ------------------
    To err is human, but to apologize frequently is embarassing.

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