Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== The ZOOM Function ====== Code the following user-defined function, called ZOOM. <code> function Zoom(void) declare function Get_Property, Dialog_Box declare subroutine Set_Property $insert Logical *Get the control that has focus and it's control TYPE Ctrl = Get_Property(@window, "FOCUS") Type = Get_Property(Ctrl, "TYPE") /* If the control is an edit table, get its position; if the control TYPE begins with "EDIT", set the variable Aux to null */ begin case case Type = "EDITTABLE" Aux = Get_Property(Ctrl, "SELPOS") case Type [1,4] = "EDIT" Aux = Get_Property(Ctrl,'DEFPROP') case OTHERWISE$ return end case /* This code assigns the window's control name or the MDIFRAME's control name to a variable. */ Parent = @window Frame = Get_Property(Parent, "MDIFRAME") if len(Frame) then Parent = Frame end /* Get the default property "DEFPROP" for the control with focus; this is probably text displayed in the control; then Display the ZOOM window as a dialog box and pass in to the ZOOM window's CREATE event the "text" (DEFPROP) from the control with focus. */ Orig = Get_Property(Ctrl, "DEFPROP", Aux) Text = Dialog_Box("ZOOM", Parent, Orig) /* If the variable Text is not null and not equal to Orig, then the text (DEFPROP) is updated for the control with focus. */ if len(Text) and Text # Orig then Set_Property(Ctrl, "DEFPROP", Text, Aux) end return Text </code> guides/programming/programmers_reference_manual/the_zoom.txt Last modified: 2024/06/19 20:20by 127.0.0.1