Hi
I ran across what I believe is a bug with a listbox. I discovered it when I used my regular VFP application in my website to dynamically generate a web page directly from the VFP class.
The strange behavior is that the listbox is shown on the screen even though it is not contained in a form. The following code demonstrates the problem.
Public lo
lo=CreateObject("container")
lo.AddObject("listBox","listbox")
lo.ListBox.Visible=.Y.
lo.ListBox.RowSourceType=0
As soon as you set the RowSourceType property the control is painted on the screen. This only happens when the listbox's visible property is set to true. All my forms are based on delayed initiation. I simply drop the container on the form at run time when the form is activated. I am using these containers in a web application which initiates the container and then calls the Rendering method which returns an HTML string representing a complete web form which is then sent to the browser.
Since this is just a normal interface container all the visible properties are set to true as required for the desktop version of the application. I cannot turn all the visible properties to false as this will mean the control will not be rendered in HTML.
I do not think any control should be visible on the screen if it is not contained in a form.
Simon
Simon White
dCipher Computing