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>
|