From: Erik B. <eb...@us...> - 2006-07-28 02:54:34
|
Update of /cvsroot/gexperts/gexperts/unstable/Src/Utils In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15228/Src/Utils Modified Files: GX_OtaUtils.pas Log Message: Make tab ordering consider BiDiMode // Get the BiDiMode property for a VCL form function GxOtaGetFormBiDiMode(Form: IOTAFormEditor): TBiDiMode; Index: GX_OtaUtils.pas =================================================================== RCS file: /cvsroot/gexperts/gexperts/unstable/Src/Utils/GX_OtaUtils.pas,v retrieving revision 1.192 retrieving revision 1.193 diff -u -d -r1.192 -r1.193 --- GX_OtaUtils.pas 5 Jul 2006 13:54:33 -0000 1.192 +++ GX_OtaUtils.pas 28 Jul 2006 02:52:56 -0000 1.193 @@ -492,6 +492,8 @@ // Returns False if there is more than one component selected // or if the currently selected component is not the root. function GxOtaSelectedComponentIsRoot(const FormEditor: IOTAFormEditor): Boolean; +// Get the BiDiMode property for a VCL form +function GxOtaGetFormBiDiMode(Form: IOTAFormEditor): TBiDiMode; // Returns True if FileName points to a valid expert DLL // (valid wizard / expert entry point). False if not. @@ -2871,6 +2873,24 @@ end end; +function GxOtaGetFormBiDiMode(Form: IOTAFormEditor): TBiDiMode; +var + FormComponent: IOTAComponent; + NativeForm: TComponent; +begin + Result := bdLeftToRight; + if Assigned(Form) then + begin + FormComponent := Form.GetRootComponent; + if Assigned(FormComponent) then + begin + NativeForm := GxOtaGetNativeComponent(FormComponent); + if Assigned(NativeForm) and (NativeForm is TCustomForm) then + Result := (NativeForm as TCustomForm).BiDiMode; + end; + end; +end; + {$UNDEF LoadAndCheckEntryPoint} {$DEFINE LoadAndCheckEntryPoint} |