Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Bug..Anyone see this. ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00509211
Message ID:
00509279
Views:
17
I found a workarround, which does work, however, its still really strange behavior.

I was refrencing the .caption property of the label control, inside
with this.parent.parent
.label2.caption=mycustomer.name && etc.
endwith

if I change it to not use the with/endwith, and refrence the label.caption directly, it works.
dont ask why.

Stepping through the code, I see that it must be something to do with the .parent.parent part of the command. (but that still does not make sense to me.

the label is part of refrenced like this.

thisform._pageframe1.page1._label1.caption and it works.

thanks anyway. I think Ill try out davids suggestion for now on, using a flat textbox. may turn out to be a better solution wo working with dynamic labels anyway.

Bob Lee





>I think David is right . it's good solution for your problem. Even if you want to do with LABEL control then , try to write code in INIT method of LABEL and set LABEL.Caption = cust.add1 . Before that use cust file .
>So caption will change . Do set it's caption each time when you navigate record .
>I think it will do.
>Bye
>Mihir
>
>
>>when working with classforms I think I found a strange behavior I can duplicate every single time.
>>
>>I use subclassed version of the label control from the _base class. and here is the trouble.
>>
>>if I change the label caption using the properties sheet, to something like this. caption=cust.add1 or caption=(add1) if in code, I change the propertity of the caption, to the same thing, because I have changed the record pointer, I want to refresh the label)
>>
>>VFP does not know what the caption propertity is. and makes the value a ""
>>
>>
>>however, if I set the property only in code. and let the default value 'label1' stay in place./ then everthing works fine...
>>
>>I have tried this over and over again and the same strange thing happens. The reason for this post is I am curious if I am just missing something basic. or has someone else noticed this. ?
>>
>>thanks
>>Bob Lee
In the beginning, there was a command prompt, and all was well.
Previous
Reply
Map
View

Click here to load this message in the networking platform