Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LockScreen=.T. affects some properties
Message
 
To
05/10/1997 13:40:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00053320
Message ID:
00053363
Views:
22
>>>When I have LockScreen=.T., I have found that some properties have strange behaviors.
>>>
>>>In one of my application, when LockScreen=.T., I change a caption on a label. When LockScreen will become .F., I will see my new caption which is ok. But, before changing this caption, I show the Width of that label which gives me a certain value. Then, I change the caption and show the Width of that label again, which still give me the old value. So, at this point, we have a situation that the Width of the label is not giving the actual Width.
>>>
>>>If I do this process with LockScreen=.F., the Width of the label will be shown ok after the change.
>>>
>>>I tried all kind of workaround in order to make the Width property to be reflected when using LockScreen=.T. So far, I haven't found a workaround.
>>>
>>>This label is in a container. Maybe there is a bug with that.
>>>
>>>IAC, having LockScreen=.T. or .F. should always give the value of the Width property correct.
>>>
>>>Any idea on how to solve this situation?
>>
>>In my opinion, this is a normal behavior. Since the label caption is not changed on the screen, the actual width is the one of the text on the screen and the new width will be in effect when the new caption will be on screen (ie when the LockScreen becomes .f.).
>
>Yes, I agree but at least we should have a way to force a reset of the Width property.
>
>In my case, I have an image which should be put at the end of the caption. I am using the Width of the caption to know where to define my Left property of the image. While the actual Width is not reflected, this is given a wrong position for the image.
>
>The only way so far I have found to solve this is to have ThisForm.LockScreen=.F. before I am calling this method but this is making the refresh to be shown in the form.


Look at TXTWIDTH Function...

Syntax

TXTWIDTH(cExpression [, cFontName, nFontSize [, cFontStyle]])



HTH :O)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform