Announcement

Collapse
No announcement yet.

ComboBox List Size/Position

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

  • ComboBox List Size/Position

    Help!

    Does anyone know how to cause the resized listbox portion of an
    ownerdraw combobox to center or align to the right edge
    of the text window? I know I need to use movewindow, but cannot get the
    listbox handle.

    I want to use an ownerdraw combox to provide several tabbed text
    columns and need to show the list portion either shoved left
    (default) or to the right (my problem).

    Thanks!

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

  • #2
    MIGHT TRY
    Code:
    RSET   LSET CSET
    
    GS = SPACE$(8)
    A$ = "File"
    CSET GS = A$
    A$ = GS

    Comment


    • #3
      Originally posted by carl w mitchell View Post

      i know i need to use movewindow, but cannot get the
      listbox handle.
      control handle ?
      The world is strange and wonderful.*
      I reserve the right to be horrifically wrong.
      Please maintain a safe following distance.
      *wonderful sold separately.

      Comment


      • #4
        Looks like question was asked 7 Nov 2000. I'll return 7 Nov 2042 with an answer.
        Meanwhile, in case someone is in a hurry, look-up %WM_CTLCOLORLISTBOX and %CB_GETDROPPEDSTATE. Else a code was also given at https://forum.powerbasic.com/forum/u...ider-drop-list

        Comment


        • #5
          There's a more recent example here

          (Shows how to set up column alignment. Doesn't address listbox position though)
          Last edited by Dave Biggs; 4 Apr 2021, 08:43 PM. Reason: Qualify - not re: Listbox pos
          Rgds, Dave

          Comment


          • #6
            from Win SDK on disk:
            An application sends a CB_GETDROPPEDCONTROLRECT message to retrieve the screen coordinates of a combo box in its dropped-down state.
            That what you are looking for?

            OR...

            Instead of using a single combobox control, you could use an edit control + button control, with a listbox control right underneath it. .

            That would give you real flexibility.. at the cost of having to perform some synchronization in code yourself.


            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment

            Working...
            X