Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in Toolbar
Message
From
20/12/1998 02:52:46
 
 
To
19/12/1998 09:24:01
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00169111
Message ID:
00169203
Views:
24
>I'm using a toolbar with active form to navigate through records and Add/Edit/Del Recs...
>
>The problem is when I go into edit/add mode and click on save/cancel button, the active control of form is still having focus and value is not refreshed..
>
>Active control can be any i.e textbox, combo, grid, check etc.etc.
>
>Is there a generic routine avl. for this problem ??
>
>Pls help...


Hello Vinod,

This is a standard behaviour of vfp. (and standard soulution too <g>)
That is a method called WriteBuffer() in your form or base class.

local llRetval

*--select your initialselectedalias here

if type("thisForm.ActiveControl")="O"
local loControl

loControl = thisForm.ActiveControl

if pemstatus(loControl,'SetFocus',5)
loControl.SetFocus()
endif

if lower(loControl.BaseClass) == "grid"
local lnColumn, loGrid, j, lcControlName

loGrid = loControl

lcControlName = loGrid.Columns[loGrid.ActiveColumn].CurrentControl

loControl = loGrid.Columns[loGrid.ActiveColumn].&lcControlName.

if pemstatus(loControl,'ControlSource',5)
loControl.SetFocus()
endif
endif
endif

return .t.



Bye,
Kaumir
Avani Cimcon ,Ahmedabad,India.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform