Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SavePosition and RestorePosition in Multi-Lingual Apps
Message
From
29/01/2003 10:03:03
 
 
To
28/01/2003 16:25:41
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00746435
Message ID:
00746674
Views:
20
>Hi,
>
>The cbaseForm 's ( cforms.vcx ) methods SavePosition and RestorePosition use the form's caption as a reference (register or ini file) to the form of which the position has to be saved or restored. But when used in multilingual applications, there's an apparently strange behaviour about this.
>Indeed, when a form instantiates, it first restores to the position that corresponds with the caption of the form in the original language. Then the form 'gets localised'.
>When the form is closed, the positions of the form are saved, but the entry in the register links these positions to the caption of the localised form. So it seems as if the positions of the forms in other than the original language aren't saved. If you want to save them, you have to go back to the original language, move the form to the desired position, close the form, get back to the desired language and open the form.
>
>It seems to me it would be better to use the form class name rather than the caption. (The position of the form will then be the same in all languages). Or when the caption is used, to restore the position after the localisation of the form has taken place. (For each language a form position is stored)
>
>Does anyone has suggestions to change this behaviour without changing the framework?

Without changing the framework? No. I think the framework is the right place to change it, which I think Kevin will when he reads your message.
Until then, a subclass of cbaseform is your only real option, and not a very good one at that, because the functionality wouldn't replicate to other subclasses (cbizobjform).
That said, my own two bits on the subject: I don't think the form class is the right token to use, because then all your forms would open to the same position. The form's instance name is what you need to use, but that might be harder to track across multiple use forms that append instance numbers.

Chris.
Previous
Reply
Map
View

Click here to load this message in the networking platform