Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
English
Combobox When( ) Method Ignored (Sort of)
Message
From
06/01/2003 12:14:29
 
 
To
02/01/2003 09:15:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Fórum:
Visual FoxPro
Category:
Formulários & Criador de Formulários
Miscellaneous
ID da thread:
00736938
ID da mensagem:
00738402
Views:
19
Cetin -

Thanks for the work-around idea. That may work.

Other people suggested changing the ProgrammaticChange( ) event. Our problem is that we sometimes change the value of a combobox while the user isn't editing any records (for instance, when the record pointer changes.)

These forms were originally set up in FP26 (mostly before I started here five years ago.) We never realized that if the comboboxes' When( ) clauses returned .F., the value could still be changed under certain circumstances.

I'm glad that it could be replicated, and that it wasn't just our own systems going kablooey.

Thanks to everyone who responded.

- George

>>Cetin -
>>
>>I have posted the form on our website:
>>
>>http://www.cdsbytes.com/examples/test.zip
>>
>>
>>Please try this form.
>>
>>- George
>
>George,
>Yes replicated with that one. Mine had another control that could get focus. It might be worked around in many ways for example by placing a 'shield' shape in front. ie:
>
>
>*Combo.init
>*...
>With This.Parent
>  .AddObject(This.Name+'_Shield','Shape')
>  With Evaluate("."+This.Name+'_Shield')
>    .BorderStyle = 0
>    .BackStyle = 0
>    .Top = This.Top
>    .Left = This.Left
>    .Width = This.Width
>    .Height = This.Height
>    .ZOrder()
>  Endwith
>Endwith
>
>*Combo.when
>LOCAL llRetVal
>llRetVal = .F.
>WITH EVALUATE("this.Parent."+this.name+'_Shield')
> .Visible = !llRetVal
>endwith
>RETURN llRetVal
>
Cetin
Previous
Responder
Mapa
View

Click here to load this message in the networking platform