//AB/ Project Properties dialog New //AB/ Object prj is a Dialog_Project //AB/ Set ProjectName to "Properties dialog New" //AB/ Set ProjectFileName to "PropertiesNew.dg" //AB/ Set Size to 240 367 // Project Object Structure // oPropertiesNew_dg is a cRDSDbModalPanel // Sncsys_DD is a DataDictionary // oImageList is a cImageList // oColorDialog is a ColorDialog // oDbTabDialog1 is a cRDSDbTabDialog // oButtons_tp is a cRDSDbTabPage // oSampleButton_bn is a cBitmapButton // oGradientFromColor_bn is a cBitmapButton // oGradientToColor_bn is a cBitmapButton // oGradientMode_cf is a cRDSComboForm // oColor_bn is a cBitmapButton // oTextColor_bn is a cBitmapButton // oFlatState_cb is a cRDSCheckBox // oBoldFace_cb is a cRDSCheckBox // oHotTrack_cb is a cRDSCheckBox // oHotTrackTextColor_bn is a cBitmapButton // oLineControl is a LineControl // oGrid_tb is a Textbox // oEnableDisableTest_bn is a cRDSButton // oResetBtnDefaults is a cRDSButton // oGrids_tp is a cRDSDbTabPage // oTableRowColor_bn is a cBitmapButton // oTableCellColor_bn is a cBitmapButton // oGridLinetColor_bn is a cBitmapButton // oTestGrid is a cRDSGrid // oGrid_tb is a Textbox (Duplicate object name) // oResetGridDefaults is a cRDSButton // oLineControl is a LineControl (Duplicate object name) // oLabelText_tp is a cRDSDbTabPage // oTableTextColor_bn is a cBitmapButton // oTestForm is a cRDSForm // oResetTextDefaults is a cRDSButton // oLineControl is a LineControl (Duplicate object name) // oToolTips_tp is a cRDSDbTabPage // oUseToolTip_cb is a cRDSCheckBox // oToolTipStyle_cb is a cRDSCheckBox // oPassword_tp is a cRDSDbTabPage // oSncsys_Uselogin is a cSysDbCheckBox // oName_fm is a cRDSForm // oPassword_fm is a cRDSForm // oOther_tp is a cRDSDbTabPage // oDebug_cb is a cRDSCheckBox // oApply_bn is a cBitmapButton // oClose_bn is a cBitmapButton // Register all objects Register_Object oApply_bn Register_Object oBoldFace_cb Register_Object oButtons_tp Register_Object oClose_bn Register_Object oColor_bn Register_Object oColorDialog Register_Object oDbTabDialog1 Register_Object oDebug_cb Register_Object oEnableDisableTest_bn Register_Object oFlatState_cb Register_Object oGradientFromColor_bn Register_Object oGradientMode_cf Register_Object oGradientToColor_bn Register_Object oGrid_tb Register_Object oGridLinetColor_bn Register_Object oGrids_tp Register_Object oHotTrack_cb Register_Object oHotTrackTextColor_bn Register_Object oImageList Register_Object oLabelText_tp Register_Object oLineControl Register_Object oName_fm Register_Object oOther_tp Register_Object oPassword_fm Register_Object oPassword_tp Register_Object oPropertiesNew_dg Register_Object oResetBtnDefaults Register_Object oResetGridDefaults Register_Object oResetTextDefaults Register_Object oSampleButton_bn Register_Object oSncsys_Uselogin Register_Object oTableCellColor_bn Register_Object oTableRowColor_bn Register_Object oTableTextColor_bn Register_Object oTestForm Register_Object oTestGrid Register_Object oTextColor_bn Register_Object oToolTipStyle_cb Register_Object oToolTips_tp Register_Object oUseToolTip_cb Register_Object Sncsys_DD Register_Procedure Set phoSnctable_Recid Handle 0 //AB-StoreTopStart Use cToolbar.pkg Global_Variable Integer giApplyKeyWasPressed Procedure DoPopupProperties Handle hoMain hoClient hoView Integer iColorOld iColorNew Integer iBtnTextColorOld iBtnTextColorNew Integer iGradientFromOld iGradientFromNew Integer iGradientToOld iGradientToNew Integer iGradientModeOld iGradientModeNew Integer iFlatStateOld iFlatStateNew Integer iBoldFaceOld iBoldFaceNew Integer iHotTrackOld iHotTrackNew Integer iHotColorOld iHotColorNew Integer iToolTipsOld iToolTipsNew Integer iTipStyleOld iTipStyleNew Integer iRowColorOld iRowColorNew Integer iCellColorOld iCellColorNew Integer iTextColorOld iTextColorNew Move 0 To giApplyKeyWasPressed Get phoMainPanel Of ghoApplication To hoMain Get phoClient Of ghoApplication To hoClient Get phoSDIView Of ghoApplication To hoView // Button object properties: Get ReadDWord Of ghoApplication "Preferences" "piButtonColor" -1 To iColorOld Get ReadDWord Of ghoApplication "Preferences" "piButtonTextColor" -1 To iBtnTextColorOld Get ReadDWord Of ghoApplication "Preferences" "piGradientFromColor" -1 To iGradientFromOld Get ReadDWord Of ghoApplication "Preferences" "piGradientToColor" -1 To iGradientToOld Get ReadDWord Of ghoApplication "Preferences" "piGradientMode" -1 To iGradientModeOld Get ReadDWord Of ghoApplication "Preferences" "pbFlatState" -1 To iFlatStateOld Get ReadDWord Of ghoApplication "Preferences" "pbButtonBoldFace" -1 To iBoldFaceOld Get ReadDWord Of ghoApplication "Preferences" "pbHotTrack" -1 To iHotTrackOld Get ReadDWord Of ghoApplication "Preferences" "piHotTrackTextColor" -1 To iHotColorOld // All objects, ToolTips properties: Get ReadDWord Of ghoApplication "Preferences" "pbToolTips" -1 To iToolTipsOld Get ReadDWord Of ghoApplication "Preferences" "pbToolTipStyle" -1 To iTipStyleOld // Grid and dbList properties: Get ReadDWord Of ghoApplication "Preferences" "CurrentRowColor" -1 To iRowColorOld Get ReadDWord Of ghoApplication "Preferences" "CurrentCellColor" -1 To iCellColorOld // All objects except buttons properties: Get ReadDWord Of ghoApplication "Preferences" "TextColor" -1 To iTextColorOld Send Popup Of oPropertiesNew_dg If (giApplyKeyWasPressed = 0) Procedure_Return Send StartWorkingMessage "Applying property changes. Please wait..." Get ReadDWord Of ghoApplication "Preferences" "piButtonColor" -1 To iColorNew If (iColorNew <> -1 And iColorOld <> iColorNew) ; Broadcast Recursive Set piButtonColor Of hoClient To iColorNew Get ReadDWord Of ghoApplication "Preferences" "piButtonTextColor" -1 To iBtnTextColorNew If (iBtnTextColorNew <> -1 And iBtnTextColorOld <> iBtnTextColorNew) ; Broadcast Recursive Set piButtonTextColor Of hoClient To iBtnTextColorNew Get ReadDWord Of ghoApplication "Preferences" "piGradientMode" -1 To iGradientModeNew If (iGradientModeNew <> -1 And iGradientModeOld <> iGradientModeNew) ; Broadcast Recursive Set Gradient_Mode Of hoClient To iGradientModeNew Get ReadDWord Of ghoApplication "Preferences" "piGradientFromColor" -1 To iGradientFromNew If (iGradientFromNew <> -1 And iGradientFromOld <> iGradientFromNew) ; Broadcast Recursive Set GradientFromColor Of hoClient To iGradientFromNew Get ReadDWord Of ghoApplication "Preferences" "piGradientToColor" -1 To iGradientToNew If (iGradientToNew <> -1 And iGradientToOld <> iGradientToNew) ; Broadcast Recursive Set GradientToColor Of hoClient To iGradientToNew Get ReadDWord Of ghoApplication "Preferences" "pbFlatState" -1 To iFlatStateNew If (iFlatStateNew <> -1 And iFlatStateOld <> iFlatStateNew) ; Broadcast Recursive Set pbFlatState Of hoClient To iFlatStateNew Get ReadDWord Of ghoApplication "Preferences" "pbButtonBoldFace" -1 To iBoldFaceNew If (iBoldFaceNew <> -1 And iBoldFaceOld <> iBoldFaceNew) ; Broadcast Recursive Set pbBoldFace Of hoClient To iBoldFaceNew Get ReadDWord Of ghoApplication "Preferences" "pbHotTrack" -1 To iHotTrackNew If (iHotTrackNew <> -1 And iHotTrackOld <> iHotTrackNew) ; Broadcast Recursive Set pbHotTrack Of hoClient To iHotTrackNew Get ReadDWord Of ghoApplication "Preferences" "piHotTrackTextColor" -1 To iHotColorNew If (iHotColorNew <> -1 And iHotColorOld <> iHotColorNew) ; Broadcast Recursive Set piHotColor Of hoClient To iHotColorNew Get ReadDWord Of ghoApplication "Preferences" "pbToolTips" -1 To iToolTipsNew If (iToolTipsNew <> -1 And iToolTipsOld <> iToolTipsNew) ; Broadcast Recursive Set pbToolTips Of hoView To iToolTipsNew Get ReadDWord Of ghoApplication "Preferences" "pbToolTipStyle" -1 To iTipStyleNew If (iTipStyleNew <> -1 And iTipStyleOld <> iTipStyleNew) ; Broadcast Recursive Set pbToolTipBalloon Of hoView To iTipStyleNew Get ReadDWord Of ghoApplication "Preferences" "CurrentRowColor" -1 To iRowColorNew If (iRowColorNew <> -1 And iRowColorOld <> iRowColorNew) ; Broadcast Recursive Set CurrentRowColor Of hoView To iRowColorNew Get ReadDWord Of ghoApplication "Preferences" "CurrentCellColor" -1 To iCellColorNew If (iCellColorNew <> -1 And iCellColorOld <> iCellColorNew) ; Broadcast Recursive Set CurrentCellColor Of hoView To iCellColorNew Get ReadDWord Of ghoApplication "Preferences" "TextColor" -1 To iTextColorNew If (iTextColorNew <> -1 And iTextColorOld <> iTextColorNew) ; Broadcast Recursive Set TextColor Of hoClient To iTextColorNew Send StopWorkingMessage // Send Activate of (phoSnctable_Recid(phoSDIView(ghoApplication))) End_Procedure // DoPopupProperties //AB-StoreTopEnd //AB-IgnoreStart Use cRDSDbModalPanel.pkg Use DataDict.pkg Use Windows.pkg Use Colr_Dlg.Pkg Use cRDSDbTabDialog.pkg Use cRDSDbTabPage.pkg Use cBitmapButton.pkg Use cRDSComboForm.pkg Use cRDSCheckBox.pkg Use DfLine.Pkg Use cRDSButton.pkg Use cRDSGrid.pkg Use cRDSForm.pkg Use cSysDbCheckBox.pkg //AB-IgnoreEnd //AB-IgnoreStart Use SNCSYS.DD //AB-IgnoreEnd Object oPropertiesNew_dg is a cRDSDbModalPanel //AB-StoreTopStart Property String psKey "Preferences" //AB-StoreTopEnd Set Border_Style to Border_Normal Set Minimize_Icon to FALSE Set Label to "Program Properties" Set Locate_Mode to Center_On_Screen Set Size to 225 352 //AB-DDOStart Object Sncsys_DD is a Sncsys_DataDictionary End_Object // Sncsys_DD Set Main_DD to Sncsys_DD Set Server to Sncsys_DD //AB-DDOEnd Object oImageList is a cImageList //AB/ Set Location to 178 54 //AB-StoreStart Procedure OnCreate Integer iIndex Get AddTransparentImage "Button16.bmp" clFuchsia To iIndex Get AddTransparentImage "Log16.bmp" clFuchsia To iIndex Get AddTransparentImage "TextBox16.bmp" clFuchsia To iIndex Get AddTransparentImage "Info.bmp" clFuchsia To iIndex Get AddTransparentImage "Keys16.bmp" clFuchsia To iIndex Get AddTransparentImage "Other16.bmp" clFuchsia To iIndex End_Procedure // OnCreate //AB-StoreEnd End_Object // oImageList Object oColorDialog is a ColorDialog //AB/ Set Location to 176 18 //AB-StoreStart Function SelectColor Returns Integer Integer iRgbColor bColorSelected Get Show_Dialog To bColorSelected If (bColorSelected = True) Begin Get SelectedColor To iRgbColor Function_Return iRgbColor End Else Function_Return -1 End_Function // SelectColor //AB-StoreEnd End_Object // oColorDialog Object oDbTabDialog1 is a cRDSDbTabDialog Set Size to 166 334 Set Location to 7 6 Set Rotate_Mode to RM_Rotate Set phoImageList to oImageList Set Auto_Clear_DEO_state to FALSE Object oButtons_tp is a cRDSDbTabPage Set Label to "Buttons" Object oSampleButton_bn is a cBitmapButton Set Label to "Sample Button" Set Size to 30 100 Set Location to 15 186 Set Status_Help to "When you change settings to the left you will immidiately see them reflected here." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Set Pointer_Only_State To True Procedure OnClick End_Procedure // OnClick //AB-StoreEnd End_Object // oSampleButton_bn Object oGradientFromColor_bn is a cBitmapButton //AB-StoreTopStart Property String psVal "piGradientFromColor" //AB-StoreTopEnd Set Label to "Gradient From Color" Set Size to 14 100 Set Location to 15 66 Set Status_Help to "Click to display Color dialog. This is the 'Start' color used to gradient fill the button control for the selected Gradient Mode." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move oSampleButton_bn To ho Get GradientFromColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set GradientFromColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get GradientFromColor Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey //AB-StoreEnd End_Object // oGradientFromColor_bn Object oGradientToColor_bn is a cBitmapButton //AB-StoreTopStart Property String psVal "piGradientToColor" //AB-StoreTopEnd Set Label to "Gradient To Color" Set Size to 14 100 Set Location to 31 66 Set Status_Help to "Click to display Color dialog. This is the 'End' color used to gradient fill the button control for the selected Gradient Mode." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move oSampleButton_bn To ho Get GradientToColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set GradientToColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get GradientToColor Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey //AB-StoreEnd End_Object // oGradientToColor_bn Object oGradientMode_cf is a cRDSComboForm //AB-StoreTopStart Property String psVal "piGradientMode" //AB-StoreTopEnd Set Label to "Gradient Mode:" Set Size to 13 100 Set Location to 47 66 Set Status_Help to "Specifies the gradient fill direction for the Gradient From Color and Gradient To Color." Set Form_Border to 0 Set Label_Col_Offset to 2 Set Label_Justification_Mode to jMode_Right Set Entry_State Item 0 to FALSE Set Combo_Sort_State to FALSE //AB-StoreStart Procedure Combo_Fill_List Send Combo_Add_Item "Gradient_Horizontal" Send Combo_Add_Item "Gradient_LeftRight" Send Combo_Add_Item "Gradient_None" Send Combo_Add_Item "Gradient_TopBottom" Send Combo_Add_Item "Gradient_Vertical" End_Procedure // Combo_fill_list Procedure OnChange Handle ho String sValue Move oSampleButton_bn To ho Get Value Item 0 To sValue Move (Trim(sValue)) To sValue Set Gradient_Mode Of ho To sValue Set Enabled_State Of oGradientFromColor_bn To (Integer(sValue) <> Gradient_None) Set Enabled_State Of oGradientToColor_bn To (Integer(sValue) <> Gradient_None) Set Enabled_State Of oColor_bn To (Integer(sValue) = Gradient_None) Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get Gradient_Mode Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Integer iState iItem String sKey sValue Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) Gradient_None To iState Case Begin Case (iState = Gradient_None) Move "Gradient_None" To sValue Case Break Case (iState = Gradient_Vertical) Move "Gradient_Vertical" To sValue Case Break Case (iState = Gradient_Horizontal) Move "Gradient_Horizontal" To sValue Case Break Case (iState = Gradient_TopBottom) Move "Gradient_TopBottom" To sValue Case Break Case (iState = Gradient_LeftRight) Move "Gradient_LeftRight" To sValue Case Break Case Else Move "Gradient_TopBottom" To sValue Case End Get WinCombo_Item_Matching sValue To iItem Set WinCombo_Current_Item To iItem End_Procedure // DoApplyRegistryKey //AB-StoreEnd End_Object // oGradientMode_cf Object oColor_bn is a cBitmapButton //AB-StoreTopStart Property String psVal "piButtonColor" //AB-StoreTopEnd Set Label to "Background Color" Set Size to 14 92 Set Location to 62 74 Set Status_Help to "Background color for button controls. Only available if Gradient_None has been selected as the Gradient Mode" Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move oSampleButton_bn To ho Get piButtonColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set piButtonColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get piButtonColor Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Integer iState iItem String sKey sValue Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) Gradient_None To iState Set Enabled_State To (iState = Gradient_None) End_Procedure // DoOnStartUp Send DoApplyRegistryKey //AB-StoreEnd End_Object // oColor_bn Object oTextColor_bn is a cBitmapButton //AB-StoreTopStart Property String psVal "piButtonTextColor" //AB-StoreTopEnd Set Label to "Text Color" Set Size to 14 100 Set Location to 78 66 Set Status_Help to "Click to display Color dialog. This is the Text Color for button controls" Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move oSampleButton_bn To ho Get piButtonTextColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set piButtonTextColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get piButtonTextColor Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey //AB-StoreEnd End_Object // oTextColor_bn Object oFlatState_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbFlatState" //AB-StoreTopEnd Set Label to "Flat Button Style" Set Size to 10 68 Set Location to 94 66 Set Status_Help to "Flat button style or raised." //AB-StoreStart Procedure OnChange Handle ho Boolean bChecked bState If Not (Active_State(Self)) Procedure_Return Get Checked_State To bChecked Move oSampleButton_bn To ho Set pbFlatState Of ho To bChecked Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bChecked bState Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState If (bChecked <> bState) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState Set Checked_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oFlatState_cb Object oBoldFace_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbButtonBoldFace" //AB-StoreTopEnd Set Label to "Bold Typeface" Set Size to 10 63 Set Location to 106 66 Set Status_Help to "Use BoldFace or Normal style for button text." //AB-StoreStart Procedure OnChange Handle ho Boolean bChecked bState If Not (Active_State(Self)) Procedure_Return Get Checked_State To bChecked Move oSampleButton_bn To ho Set pbBoldFace Of ho To bChecked Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bChecked bState Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState If (bChecked <> bState) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState Set Checked_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oBoldFace_cb Object oHotTrack_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbHotTrack" //AB-StoreTopEnd Set Label to "Hot Track" Set Size to 10 49 Set Location to 118 66 Set Status_Help to "If checked the 'Hot Text Color' is used when the mouse is hoovered over the button control." //AB-StoreStart Procedure OnChange Handle ho Boolean bChecked bState If Not (Active_State(Self)) Procedure_Return Get Checked_State To bChecked Move oSampleButton_bn To ho Set pbHotTrack Of ho To bChecked Set Enabled_State Of oHotTrackTextColor_bn To bChecked Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bChecked bState Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState If (bChecked <> bState) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState Set Checked_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oHotTrack_cb Object oHotTrackTextColor_bn is a cBitmapButton //AB-StoreTopStart Property String psVal "piHotTrackTextColor" //AB-StoreTopEnd Set Label to "Hot Text Color" Set Size to 14 92 Set Location to 130 74 Set Status_Help to "Click to display Color dialog. This is the text color displayed when the mouse is hoovering over a button control." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move oSampleButton_bn To ho Get piHotColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set piHotColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get piHotColor Of oSampleButton_bn To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) iNewKey End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) "pbHotTrack" False To bState Set Enabled_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oHotTrackTextColor_bn Object oLineControl is a LineControl Set Horizontal_State to FALSE Set Size to 143 2 Set Location to 4 177 End_Object // oLineControl Object oGrid_tb is a Textbox Set Label to "Sample Control::" Set Location to 5 186 Set Size to 10 53 Set TypeFace to "MS Sans Serif" End_Object // oGrid_tb Object oEnableDisableTest_bn is a cRDSButton //AB-StoreTopStart Property Boolean pbState False //AB-StoreTopEnd Set Label to "Test Enabled/Disabled State" Set Size to 14 100 Set Location to 62 186 Set Status_Help to "Click to see how the Sample Button looks when enabled and disabled." //AB-StoreStart Procedure OnClick Boolean bState Get pbState To bState Set pbState To (Not(bState)) Set Enabled_State Of oSampleButton_bn To bState End_Procedure // OnClick //AB-StoreEnd End_Object // oEnableDisableTest_bn Object oResetBtnDefaults is a cRDSButton //AB-StoreTopStart Property Boolean pbState False //AB-StoreTopEnd Set Label to "Restore Default Settings" Set Size to 14 89 Set Location to 130 237 Set Status_Help to "Revert to standard settings" //AB-StoreStart Procedure OnClick Handle ho Boolean bState Move oSampleButton_bn To ho Set piButtonColor Of ho To clBtnFace Set piButtonTextColor Of ho To clWindowText Set Gradient_Mode Of ho To Gradient_Vertical Set GradientFromColor Of ho To clWhite Set GradientToColor Of ho To clDkGray Set piHotColor Of ho To clBlue Send DoApplyRegistryKey Of oGradientMode_cf Set Checked_State Of oFlatState_cb To True Set Checked_State Of oBoldFace_cb To False Set Checked_State Of oHotTrack_cb To True Set Enabled_State Of oApply_bn To True End_Procedure // OnClick //AB-StoreEnd End_Object // oResetBtnDefaults //AB-StoreStart //AB-StoreEnd End_Object // oButtons_tp Object oGrids_tp is a cRDSDbTabPage Set Label to "Grids" Set piImageIndex to 1 Object oTableRowColor_bn is a cBitmapButton Set Label to "Current Row Color" Set Size to 15 100 Set Location to 15 66 Set Status_Help to "Click to display Color dialog. The selected attribute can be viewed in the sample control to the right." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move (oTestGrid(Self)) To ho Get CurrentRowColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set CurrentRowColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick //AB-StoreEnd End_Object // oTableRowColor_bn Object oTableCellColor_bn is a cBitmapButton Set Label to "Current Cell Color" Set Size to 15 100 Set Location to 32 66 Set Status_Help to "Click to display Color dialog. The selected attribute can be viewed in the sample control to the right." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move (oTestGrid(Self)) To ho Get CurrentCellColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set CurrentCellColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick //AB-StoreEnd End_Object // oTableCellColor_bn Object oGridLinetColor_bn is a cBitmapButton Set Label to "Grid Line Color" Set Size to 15 100 Set Location to 49 66 Set Status_Help to "Click to display Color dialog. The selected attribute can be viewed in the sample control to the right." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move (oTestGrid(Self)) To ho Get peGridLineColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set peGridLineColor Of ho To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick //AB-StoreEnd End_Object // oGridLinetColor_bn Object oTestGrid is a cRDSGrid Set Size to 63 139 Set Location to 15 186 Set Highlight_Row_state to TRUE Set Line_Width to 3 0 Set Form_Width item 0 to 44 Set Header_Label item 0 to "Column 1" Set Form_Width item 1 to 44 Set Header_Label item 1 to "Column 2" Set Form_Width item 2 to 44 Set Header_Label item 2 to "Column 3" //AB-StoreStart Set Select_Mode To No_Select Set Status_Help Item 0 To "When you change settings To the Left you will immidiately see them reflected here." Procedure DoFillGrid Integer iRow iMaxRows iItems Move 5 To iMaxRows For iRow From 1 To iMaxRows Send Add_Item Msg_None "col1" //("Col 1, row " + String (iRow))) Send Add_Item Msg_None "col2" //("Col 2, row " + String (iRow))) Send Add_Item Msg_None "col3" //("Col 3, row " + String (iRow))) Loop Get Item_Count To iItems For iRow From 0 To (iItems - 1) Set Entry_State Item iRow To False Loop Set Item_Shadow_State Item 2 To True Set Item_Shadow_State Item 5 To True Set Item_Shadow_State Item 8 To True Set Item_Shadow_State Item 11 To True Set Item_Shadow_State Item 14 To True End_Procedure // DoFillGrid Send DoFillGrid Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get CurrentRowColor To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) "CurrentRowColor" -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) "CurrentRowColor" iNewKey Get CurrentCellColor To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) "CurrentCellColor" -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) "CurrentCellColor" iNewKey Get peGridLineColor To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) "peGridLineColor" -1 To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) "peGridLineColor" iNewKey End_Procedure // DoWriteRegistryKey //AB-StoreEnd End_Object // oTestGrid Object oGrid_tb is a Textbox Set Label to "Sample Control:" Set Location to 5 186 Set Size to 10 51 Set TypeFace to "MS Sans Serif" End_Object // oGrid_tb Object oResetGridDefaults is a cRDSButton //AB-StoreTopStart Property Boolean pbState False //AB-StoreTopEnd Set Label to "Restore Default Settings" Set Size to 15 89 Set Location to 130 237 Set Status_Help to "Revert to standard settings" //AB-StoreStart Procedure OnClick Handle ho Boolean bState Move oTestGrid To ho Set CurrentRowColor Of ho To clAqua Set CurrentCellColor Of ho To clAqua Set peGridLineColor Of ho To clBtnFace Set Enabled_State Of oApply_bn To True End_Procedure // OnClick //AB-StoreEnd End_Object // oResetGridDefaults Object oLineControl is a LineControl Set Horizontal_State to FALSE Set Size to 143 2 Set Location to 4 177 End_Object // oLineControl //AB-StoreStart On_Key Key_Alt+Key_S Send KeyAction Of oTableRowColor_bn On_Key Key_Alt+Key_E Send KeyAction Of oTableCellColor_bn //AB-StoreEnd End_Object // oGrids_tp Object oLabelText_tp is a cRDSDbTabPage Set Label to "Labels/Text" Set piImageIndex to 2 Object oTableTextColor_bn is a cBitmapButton Set Label to "Text Color" Set Size to 14 100 Set Location to 15 66 Set Status_Help to "Text Color for all application controls. The selected attribute can be viewed in the sample control to the right." Set Bitmap to "Colors16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Integer ho iOldColor iNewColor Move (oTestForm(Self)) To ho Get TextColor Of ho To iOldColor Set SelectedColor Of oColorDialog To iOldColor Get SelectColor Of oColorDialog To iNewColor If (iOldColor <> iNewColor And iNewColor <> -1) Begin Set TextColor Of ho To iNewColor Set TextColor Of (Label_Object(ho)) To iNewColor Set Enabled_State Of oApply_bn To True End // If (iOldColor <> iNewColor) Begin End_Procedure // OnClick //AB-StoreEnd End_Object // oTableTextColor_bn Object oTestForm is a cRDSForm Set Label to "Sample Control:" Set Size to 13 100 Set Location to 15 186 Set Status_Help to "Sample control to display the selected Text Color." Set Label_Col_Offset to 0 Set Label_Justification_Mode to jMode_Top //AB-StoreStart Procedure DoWriteRegistryKey Integer iNewKey iOldKey Get TextColor To iNewKey Get ReadDWord Of ghoApplication (psKey(Self)) "TextColor" clWindowText To iOldKey If (iNewKey <> iOldKey) ; Send WriteDWord Of ghoApplication (psKey(Self)) "TextColor" iNewKey End_Procedure // DoWriteRegistryKey // This has been put here to avoid the need to put this in each // standard DAW VDF subclass: Procedure OnStartUp Integer iColor Set Value Item 0 To "Some sample text" Get ReadDWord Of ghoApplication (psKey(Self)) "TextColor" clWindowText To iColor Broadcast Recursive Set TextColor Of (phoClient(ghoApplication)) To iColor End_Procedure // OnStartup Send OnStartUp //AB-StoreEnd End_Object // oTestForm Object oResetTextDefaults is a cRDSButton //AB-StoreTopStart Property Boolean pbState False //AB-StoreTopEnd Set Label to "Restore Default Settings" Set Size to 16 89 Set Location to 154 237 Set Status_Help to "Revert to standard settings" //AB-StoreStart Procedure OnClick Handle ho Boolean bState Move oTestForm To ho Set TextColor Of ho To clWindowText Set TextColor Of (Label_Object(ho)) To clWindowText Set Enabled_State Of oApply_bn To True End_Procedure // OnClick //AB-StoreEnd End_Object // oResetTextDefaults Object oLineControl is a LineControl Set Horizontal_State to FALSE Set Size to 167 2 Set Location to 4 177 End_Object // oLineControl End_Object // oLabelText_tp Object oToolTips_tp is a cRDSDbTabPage Set Label to "ToolTips" Set piImageIndex to 3 Object oUseToolTip_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbToolTips" //AB-StoreTopEnd Set Label to "Use ToolTip Hints" Set Size to 10 73 Set Location to 15 66 Set Status_Help to "Display ToolTip help when hoovering the mouse over an object. (The text you are seeing now.)" //AB-StoreStart Procedure OnChange If Not (Active_State(Self)) Procedure_Return Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bState bChecked Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) True To bState If (bChecked <> bState) Begin Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End // If (bChecked <> bState) Begin End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) True To bState Set Checked_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oUseToolTip_cb Object oToolTipStyle_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbToolTipStyle" //AB-StoreTopEnd Set Label to "Balloon ToolTip Style" Set Size to 10 83 Set Location to 29 66 Set Status_Help to "Use Balloon ToolTip Style like a cartoon balloon with a stem pointing to the control.\nNote: ToolBars and TabPages never uses the Balloon ToolTip Style." //AB-StoreStart Procedure OnChange If Not (Active_State(Self)) Procedure_Return Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bState bChecked Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState If (bChecked <> bState) Begin Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End // If (bChecked <> bState) Begin End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState Set Checked_State To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oToolTipStyle_cb End_Object // oToolTips_tp Object oPassword_tp is a cRDSDbTabPage Set Label to "Password Protection" Set piImageIndex to 4 Object oSncsys_Uselogin is a cSysDbCheckBox Entry_Item Sncsys.Uselogin Set Label to "Use Login for CrossMerge Builder" Set Size to 10 121 Set Location to 15 66 Set Status_Help to "Display a login dialog when starting CrossMerge Builder. The Engine will not use the dialog." //AB-StoreStart Procedure OnChange Boolean bChecked bChanged If (Active_State(Self)) Begin Get Changed_State Of Sncsys_DD To bChanged Get Field_Current_Value Of Sncsys_DD Field SncSys.UseLogin To bChecked Set Enabled_State Of oName_fm To bChecked Set Enabled_State Of oPassword_fm To bChecked If bChanged Set Enabled_State Of oApply_bn To True End // If (Active_State(Self)) Begin End_Procedure // OnChange //AB-StoreEnd End_Object // oSncsys_Uselogin Object oName_fm is a cRDSForm Set Label to "Name:" Set Size to 13 90 Set Location to 28 74 Set Status_Help to "The user name to use when starting CrossMerge Builder." Set Label_Col_Offset to 2 Set Label_Justification_Mode to jMode_Right //AB-StoreStart Set Enabled_State To SncSys.Uselogin Procedure DoWriteRegistryKey String sValue Get Value Item 0 To sValue Set Field_Changed_Value Of Sncsys_DD Field SncSys.User To sValue End_Procedure // DoWriteRegistryKey Procedure OnChange Boolean bChanged If (Active_State(Self)) Begin Get Changed_State Of Sncsys_DD To bChanged If bChanged Set Enabled_State Of oApply_bn To True End // If (Active_State(Self)) Begin End_Procedure // OnChange Procedure OnStartUp String sValue Get Field_Current_Value Of Sncsys_DD Field SncSys.User To sValue Set Value Item 0 To sValue End_Procedure // OnStartUp Send OnStartUp //AB-StoreEnd End_Object // oName_fm Object oPassword_fm is a cRDSForm Set Label to "Password:" Set Size to 13 90 Set Location to 42 74 Set Status_Help to "The password to use when starting CrossMerge Builder." Set Label_Col_Offset to 2 Set Label_Justification_Mode to jMode_Right //AB-StoreStart Set Enabled_State To SncSys.Uselogin Set Password_State Item 0 To True Procedure DoWriteRegistryKey String sValue Get Value Item 0 To sValue Set Field_Changed_Value Of Sncsys_DD Field SncSys.Pv To sValue End_Procedure // DoWriteRegistryKey Procedure OnChange Boolean bChanged If (Active_State(Self)) Begin Get Changed_State Of Sncsys_DD To bChanged If bChanged Set Enabled_State Of oApply_bn To True End // If (Active_State(Self)) Begin End_Procedure // OnChange Procedure OnStartUp String sValue Get Field_Current_Value Of Sncsys_DD Field SncSys.Pv To sValue Set Value Item 0 To sValue End_Procedure // OnStartUp Send OnStartUp //AB-StoreEnd End_Object // oPassword_fm End_Object // oPassword_tp Object oOther_tp is a cRDSDbTabPage Set Label to "Other" Set piImageIndex to 5 Object oDebug_cb is a cRDSCheckBox //AB-StoreTopStart Property String psVal "pbDebugMode" //AB-StoreTopEnd Set Label to "Debug Mode On" Set Size to 10 69 Set Location to 15 66 Set Status_Help to "If an error occur display the error message with a status number and the source line number. Use this when you want to report a program bug." //AB-StoreStart Procedure OnChange If Not (Active_State(Self)) Procedure_Return Set Enabled_State Of oApply_bn To True End_Procedure // OnChange Procedure DoWriteRegistryKey Boolean bState bChecked Get Checked_State To bChecked Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState If (bChecked <> bState) Begin Send WriteDWord Of ghoApplication (psKey(Self)) (psVal(Self)) bChecked End // If (bChecked <> bState) Begin End_Procedure // DoWriteRegistryKey Procedure DoApplyRegistryKey Boolean bState String sKey Get RegistryKeyString Of ghoApplication To sKey Move (sKey + "\" + psKey(Self)) To sKey Get ReadDWord Of ghoApplication (psKey(Self)) (psVal(Self)) False To bState Set Checked_State To bState Set Verbose_State Of Error_Info_Object To bState End_Procedure // DoApplyRegistryKey Send DoApplyRegistryKey // Do on program startup. //AB-StoreEnd End_Object // oDebug_cb End_Object // oOther_tp //AB-StoreStart Procedure OnSetFocus Send DoApplyRegistryKey Of oGradientMode_cf End_Procedure // OnSetFocus //AB-StoreEnd End_Object // oDbTabDialog1 Object oApply_bn is a cBitmapButton Set Label to "&Apply" Set Size to 14 50 Set Location to 179 236 Set Status_Help to "Apply changes.\nNote: You will not be able to see the application changes until the property dialog is closed." Set Bitmap to "Ok16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Set Enabled_State To False Procedure OnClick Handle ho Move (Parent(Self)) To ho Move 1 To giApplyKeyWasPressed Broadcast Recursive Send DoWriteRegistryKey Of ho Send Request_Save Of SncSys_DD Set Enabled_State To False End_Procedure // OnClick //AB-StoreEnd End_Object // oApply_bn Object oClose_bn is a cBitmapButton Set Label to "&Close" Set Size to 14 50 Set Location to 179 290 Set Status_Help to "Close panel. If you have made any changes, you need to press the 'Apply' button first." Set Bitmap to "Cancel16.bmp" Set piTransparentColor to clFuchsia //AB-StoreStart Procedure OnClick Send Close_Panel End_Procedure // OnClick //AB-StoreEnd End_Object // oClose_bn //AB-StoreStart On_Key Key_Alt+Key_A Send KeyAction Of oApply_bn On_Key Key_Ctrl+Key_S Send KeyAction Of oApply_bn On_Key Key_Alt+Key_F2 Send KeyAction of oApply_bn On_Key Key_Alt+Key_C Send KeyAction Of oClose_bn On_Key kCancel Send KeyAction Of oClose_bn //AB-StoreEnd End_Object // oPropertiesNew_dg //AB-StoreStart //AB-StoreEnd //AB/ End_Object // prj