Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DirectoryListBox - FileListBox 1

Status
Not open for further replies.

stylonurus

Programmer
Jun 7, 2006
19
0
0
US
Hopefully this is a simple one but for me I've already spent a few hours on it. Any hints are welcome. I'm using Borland C++ 6 Builder.

On a form I have a DirectoryListBox1 and a FileListBox1. In the FileListProperty of the DirectoryListBox I have placed the FileListBox1 name.

When I create a file in the FileListBox1, I cannot see it until I doubleclick on a different subdirectory in the DirectoryListBox1 and then return to the directory where the file was created. I tried refresh() repaint() etc.

There must be an easy way for the newly created filename to appear in the FileListBox1 with having the user exit and reenter it.

Thanks,
Rick
 
I was finally able to get this working by parsing the filename into a string as shown here

Code:
AnsiString  theReportFileName;
.
parse the filename into theReportFileName
.
FileListBox1->AddItem[theReportFileName, NULL);

but there must be a better way.

Thaks Rick
 
Try this:
Code:
FileListBox1->Update(); // Forces update of list box
Repaint(); // repaints the screen




James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top