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:
01064136
Views:
18
Hi Terry

Ever since I can remember FoxPro has support .Y.,.N.,.F.,.T. in logical fields. It makes no difference whether it is used in a desktop app or on the web.

The web application does not change anything in this regard since it is just a VFP application that returns HTML to the browser. The surprise I got was when I saw a control painted on the screen even though there is no form involved. As my repo code shows you can do it straight from the command window.

Regards,
Simon White


>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
Simon White
dCipher Computing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform