//============================================================================= // Project : SigCj - VDF Classes for Codejock // File : SigCjCalendar_PMinWidth.dg // Description : VDF Class for Codejock control // // Revision : $Rev: $ // $Date: $ // $Author: $ // // Requirements : Visual DataFlex 14.1+ // Codejock SuitePro - Version 13.4.0+ // // Copyright : Copyright © 2009-2012 VDF SIG UK, All rights reserved. // Visual DataFlex Special Interest Group UK. // http://www.vdfsig.co.uk/ // // This file is part of SigCj. // // SigCj is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, either version // 2.1 of the License, or (at your option) any later version. // // SigCj is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // If you have the complete SigCj workspace then a copy of the // GNU Lesser General Public License is in the Docs folder. If // not, see . // //=============================================================================Use Windows.pkg Use Dfspnfrm.pkg Use Calendar_v2\cSigCJCalendar_DialogClasses.pkg Object oSigCjCalendar_MinWidth_Panel is a ModalPanel Set Size to 74 113 Set Label to "Minimum Column Width" Set piMinSize to 60 113 Set Location to 2 2 Set Border_Style to Border_Thick Property Integer piWidth Object oType is a cSigCJCalendar_RadioGroup_NB Set Location to 0 5 Set Size to 51 69 Set Border_Style to Border_None Object oNone is a Radio Set Auto_Size_State to False Set Label to "None" Set Size to 10 60 Set Location to 7 5 Set AlignmentMode to taLeftJustify End_Object Object oAuto is a Radio Set Auto_Size_State to False Set Label to "Auto" Set Size to 10 60 Set Location to 22 5 Set AlignmentMode to taLeftJustify End_Object Object oCustom is a Radio Set Auto_Size_State to False Set Label to "Custom" Set Size to 10 60 Set Location to 37 5 Set AlignmentMode to taLeftJustify End_Object Procedure Notify_Select_State Integer iToItem Integer iFromItem Forward Send Notify_Select_State iToItem iFromItem If (iToItem = 0) Set piWidth to 0 If (iToItem = 1) Set piWidth to -1 Set Enabled_State of oWidth to (iToItem = 2) End_Procedure End_Object Object oWidth is a SpinForm Set Size to 13 30 Set Location to 35 75 Set Maximum_Position to 100 Set Minimum_Position to 10 Set Wrap_State to True End_Object Object oOK_Btn is a Button Set Label to "&OK" Set Location to 56 4 Set peAnchors To anBottomRight Procedure OnClick If (Current_Radio(oType) = 2) Set piWidth to (Spin_Value(oWidth)) Send Close_Panel End_Procedure End_Object Object oCancel_Btn is a Button Set Label to "&Cancel" Set Location to 56 59 Set peAnchors to anBottomRight Procedure OnClick Set piWidth to -2 Send Close_Panel End_Procedure End_Object On_Key Key_Alt+Key_O Send KeyAction of oOK_Btn On_Key Key_Alt+Key_C Send KeyAction of oCancel_Btn Function Show_Dialog Integer iWidth Returns Integer Set Current_Radio of oType to 0 If (iWidth = -1) Set Current_Radio of oType to 1 If (iWidth > 0) Begin Set Current_Radio of oType to 2 Set Spin_Value of oWidth to iWidth End Send Popup Function_Return (piWidth(Self)) End_Function End_Object