Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid & Memo and other problems...
Message
 
 
To
11/06/1999 09:39:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00227549
Message ID:
00228782
Views:
20
Hi Dragan & Bruce,

>Now try this:
>
>if TYPE(lafieldlist[i])="L"
> This.columns(i).controlsource=[IIF(]+lafieldlist[i]+[, 'N', 'Y')]
>else
> This.columns(i).controlsource = lafieldlist[i] && Assign controlsource
>endif

Thanks a lot! It works now!!!!!! Finally I got what I want, great!

>I think it's the macro in the upper version which stuffed the value of the field, and not the field's name into lbValue. You don't need the value here, you need the name, and the IIF() will return a value at runtime.

>
>> If Not empty(PrevFocus)
>> THISFORM.&PrevFocus..SetFocus()
>> endif
>> Am I right?
>>
>> So, we need to change our classes this way, right? So, I have another question - how can I check that this property exists on my form? Because I can not assign if the property doesn't exist...
>
You'd have to change both the controls' classes and the form's class, just to make sure that it actually has the property you need. You may try to check thisform.activecontrol in the button's when event - it may be just early enough before the previous control loses focus.

I can try this because it's much easier than check all controls lostfocus()
event. These all were just teoretically and in my mind I found another problem:
suppose my controls not on the form, but, for example, on a page in pageframe,
so ThisForm.&PrevFocus..SetFocus() would cause a syntax error. How can I resolve this situation?

This may not be sure, you have to check for accessing the button via mouse, in regular tab order, or via a hotkey. I've observed different firing sequences of the button's events, so your mileage may vary. Still, I seem to remember that during the button's When event, the button is not the Form.activecontrol yet (if you press a hotkey and When return's false, the button should never get focus), so it may be worth trying.

So, I'll try right now and will see. Thanks.

>I can't try at the moment, because most of my VFP is scrambled after several powerouts these days. I hope it will be enough to just restore Foxuser from backup... last time I had to reinstall a lot.

Hopefully, everything will be fine...

Thanks again for your help
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform