Announcement

Collapse
No announcement yet.

listbox (Listview or grid) row size

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

  • listbox (Listview or grid) row size

    I've searched for row height and downloaded and looked online but can't find how to change or set the row size in a listbox or list view. I've looked at MLG and other grid tools and can't find anything that will allow this. The item would be one column, with unlimited rows, but there would be 3 or 4 lines of characters in each line

    I basically would have a list of several blocks or cells, each with 3 or 4 lines of information, with each bock seperated with a line. Verticle scroll bars if the number of cells exceeds the window size.
    Barry

  • #2
    Originally posted by Barry Erick View Post
    ...row size in a listbox or list view. I've looked at MLG and other grid tools and can't find anything that will allow this.
    is this the same as column width?

    Comment


    • #3
      Listbox = Message LB_SETITEMHEIGHT ( tough one to remember, huh?)
      Listview= no direct message. You can include an image (icon) the height of the row desired; or you can set the font larger. either one of those will work.

      Somewhere here is an example of exactly what you want to do... three or four lines of text per "item." It was an "owner-drawn listbox" written by Borje Hagsten.

      If you can't find it let me know. I have it here somewhere.
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Chris:
        No, width is easy to set.
        Michael,
        I looked at the SDK help for anything with row or height and could not find it, but I searched with listbox and not lb_ and never got a link to the lb_

        Of course, I am trying to watch the olympics at the same time.

        If you can find the sample, let me know as I've searched alot and must not be using the correct keywords.
        Barry

        Comment


        • #5
          OLD REF but still opens

          http://www.powerbasic.com/support/fo...ML/007110.html

          Post # 3 from top.

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

          Comment


          • #6
            Well with MS Flexigrid which should now be easy to use with PB9 this was a fairly simple procedure. A few lines from a very old VB6 program
            whgt# = ElfBillF.TextHeight(Zb.Desc)
            wwid# = ElfBillF.TextWidth(Zb.Desc)
            If wwid# / GrT.ColWidth(2) > 1 Then GrT.RowHeight(y&) = GrT.RowHeight(y&) + GrT.RowHeight(0)

            Grt was the grid and as each text field was entered into a row it just determined the size of the text (similar functions are in PB) and adjusted the row height accordingly, that columns cells having been set to auto wrap text.

            Comment


            • #7
              Thanks, which I should have said after my last answer as I did get it working.
              Barry

              Comment


              • #8
                Bary, care to share what you got running?
                Engineer's Motto: If it aint broke take it apart and fix it

                "If at 1st you don't succeed... call it version 1.0"

                "Half of Programming is coding"....."The other 90% is DEBUGGING"

                "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                Comment

                Working...
                X