gettingstarted
[Top] [All Lists]

Re: Listbox Headings and Editing Initial Values

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Listbox Headings and Editing Initial Values
From: Terry Ford <tmford at shaw dot ca>
Date: Fri, 10 Sep 2004 13:11:08 -0700
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <7C256DAA-0295-11D9-B8F8-000393CCF5DC at realsoftware dot com> <F01048D9-0334-11D9-B987-000A95DE6CC0 at math dot boisestate dot edu> <697C01C2-035F-11D9-BD9C-00306549C134 at pcisys dot net> <Pine dot OSX dot 4 dot 61 dot 0409101530140 dot 12954 at modnar dot giss dot nasa dot gov> <00c201c4976d$4e4c4ff0$60a89752 at freelanceff321> <4142030D dot 1040701 at ljug dot com>

On 10-Sep-04, at 12:39 PM, Will Leshner wrote:

Reinier & Wided wrote:

Sorry, wrong button.
Put this in App.Open:
 Window1.ListBox1.Heading(0)="File name"
 Window1.ListBox1.Heading(1)="Size"
Where Window1 is your window, ListBox1 is your listbox.
Now run it (you won't see the headings in the editor.

Although that probably does work, I don't recommend it. First of all, the headers *are* settable via the properties window. You just have to use tabs as the delimmeter. Second, the above code sets up a really unfortunate dependency between the app object and a ListBox on Window1. If you are going to set the headers in code, at least do it in the ListBox's Open event directly.

I agree 100% and this is a very important point in OOP design.

Emphasis should be made here that anything that refers to the construction or set up of an object (Control or Class) should be contained within that object as much as possible. Using the App. class or a module to initialize some other object is the same as the old line entered text IMHO.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>