Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Container.SetFocus() issue
Message
 
 
À
16/10/2013 14:47:17
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01585520
Message ID:
01585688
Vues:
53
>>>>Christian --
>>>>
>>>>You said in visual classes you don't have so much control
>>>>
>>>>At least you have some control -- sending a control to the back puts it first and bringing it to the front puts it last.
>>>>
>>>
>>>Yep. Control goes to the first object as defined in z-order. Although useful, the thing that gets really annoying is that it may or may not affect tab order the same way as zorder. It becomes very annoying when you've got overlapping controls. Let's say you've placed a shape control on the form to "outline" a group of controls. Let's say you've got a textbox over the shape, and you select "send-to-back" -- it now ends up *behind* the shape object. If the shape interior is opaque now your textbox is *behind* the shape. If the shape interior is transparent, the visual effect is OK, but the behavior might not be OK -- the shape that is "in front" of the textbox now captures mouse events -- so you might not be able to click on the textbox. In many situations the effects of "move-to-front" and "move-to-back" caused enough "side-effects" that it was easier to "fix" the problem by first "hacking" the form (i.e. open form as DBF and editing directly) to get rid of the "zorder" properties, then manually changing the zorder by repeatedly cutting the controls and pasting them back in the order that I wanted them to appear.
>>
>>If I just could talk for a minute to that guy who decided that it seemed to be a good idea at that time to set the focus to the first instantiated object on the container and to ignore the tab index...
>
>LOL. I've been saying that about the most recent project I inherited. I want to kick him in the shins.

Yes, really, I'm in the mood to give out this years weasel award :)
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform