Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox Visibility Bug?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063983
Message ID:
01063987
Views:
13
Simon

Interesting. I was going to pick you up on assigning .Y. to the visible property, rather than .T., but I've since experimented and it seems that VFP is happy with this and interprets it as .T.

I didn't know you could do that. OTOH, I'm not familiar with WEB applications and maybe it doesn't work in that env.
OTOH, it might have been a typo?

Terry

>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
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform