Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox Visibility Bug?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
ListBox Visibility Bug?
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063983
Message ID:
01063983
Views:
76
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
Next
Reply
Map
View

Click here to load this message in the networking platform