I created ListBox1 in ContainerControl1 . I have put ContainerControl1 on DetailWindow at design time (in the IDE) and got the name ContainerControl11. Now I try to set the focus on the ListBox with:
As Tim said ShowModal shows the window MODAL and executes code in that window until it closes - only then does code execution continue after the ShowModal. So how about the Open event of the ShowDetail window? Seems the logical place for it.
Tim and Markus… Thank you for the suggestions… But even these suggestions don’t work. I removed the Container Control and did put the ListBox1 directly (without Container Control) in DetailWindow. This works well… However, I did want to use one DetailWindow with one ListBox, dynamic generated Labels and dynamic generated TextFields to manage (Create, Update, Delete) records in several database tables (e.g. table customers, table suppliers,…). It seems now, I will have to create a DetailWindow for Customers, a DetailWindow for Suppliers… With my Java and C++ experience, this seems so strange to me…