No announcement yet.

Field Strings

  • Filter
  • Time
  • Show
Clear All
new posts

  • Field Strings

    I am looking at my "RTF Made Easy" and beefing it up some. In the middle of it I found I somehow broke the display. So I set out to find what part I made a mistake in, and found it is much easier to troubleshoot when the actual code is more like PB where you can indent, and read easier to find a missing semi-colon or some character out of place.

    So I started looking at formatting the actual string as something I can read, which led me to wonder if Fields is what I need to do so the text of each indent is in its own "Field" (or indented and out-dented as needed) to make things more readable.

    Does anyone have a good example of how something like this could be shown in a tabular type of format? (something like, each "Field" is indented 5 spaces from the other, but if I field is 80 chars long instead of 60 then the full thing takes care of itself?) or am I stuck at keeping track of the "Longest Field" and then adjust my display accordingly.

    (Do NOT worry about fonts, I plan on Courier so that regardless the size of the characters, they are displayed with the same spacing)
    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? "

  • #2
    What do you want, a table which word-wraps column info, using additional lines when the content exceeds the defined column width?

    I have to believe there is a 'rich text' command to do that.

    > or am I stuck at keeping track of the "Longest Field" and then adjust
    > my display accordingly

    ... do you want to dynamically size the column widths so no column data ever use more than one vertical line?

    For formatting strings into columns in general - that is, not within a richtext control - there are several Windows controls - and text drawing functions if you are into owner-drawing - which allow you to set tabstops and delimit the columns of each row with $TAB characters. Maybe this is what you are looking for?

    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]