//*************************************************************************** //* //* Class: cTHEdit //* Package Name: cTHEdit.pkg //* //*************************************************************************** Use DFAllEnt.pkg Class cTHEdit Is a Edit // Construct_Object: Object constructor. Procedure Construct_object Forward Send Construct_Object End_Procedure // Construct_object // Create and augment procedure and functions // Snippet From Sture's wonderful vdfquery library, we need to 'rewrite' this // // BASED ON Text_EditObjectValue Function TextEditValue Returns String Integer liMax liItm liMargin liFormatSize lbActive String lsRval lsLine Get active_state To lbActive // In windows Edit objects behave If lbActive Begin // differently when they are Get format_size To liFormatSize // active. If active we have to Set format_size To 32000 32000 // do some mysterious stuff to Set dynamic_update_state To true // get the correct value from it. End // Tsk tsk. Get line_count To liMax Move "" To lsRval For liItm From 0 To (liMax-1) Get value Item liItm To lsLine Move (Replaces(Character(10),lsLine,"")) To lsLine Move (Replaces(Character(13),lsLine,"")) To lsLine Move (lsRval+lsLine) To lsRval If liItm Ne (liMax-1) Move (lsRval+Character(10)) To lsRval Loop If lbActive Begin // Tsk tsk... Set format_size To (hi(liFormatSize)) (low(liFormatSize)) Set dynamic_update_state To DFTRUE End Function_Return lsRval End_Function // TextEditValue Procedure Set TextEditValue String lsValue Integer liLen liPos liMargin liItm String lsLine lsChar lsTen Send delete_data Move (Character(10)) To lsTen Move 0 To liItm Move "" To lsLine Move (length(lsValue)) To liLen For liPos From 1 To liLen Move (Mid(lsValue,1,liPos)) To lsChar If lsChar Eq lsTen Begin Set value Item liItm To lsLine Increment liItm Move "" To lsLine End Else Move (lsLine+lsChar) To lsLine Loop If lsLine Ne "" Set value Item liItm To lsLine End_Procedure // Set TextEditValue End_Class // cTHEdit