<% var SpOpCompCount = Form.SpOpCompCount; if (Form.IsFirstRequest) { var Idx = 1; var Jdx = 1; var TopOffSet = 1; var ALeftOffSet = Form.SpPanelLeft+5; var PanelTop = Form.SpPanelTop; var ComboControlCount = Form.ComboControlCount; var TopGap=25; var MiddleGap=498; var PrevCompType = ""; while (Idx<=SpOpCompCount){ var ACompType = Form.Get2ParamVal("SpecialOptionType", Idx); var ALabel = Form.CreateComponent("TcxWebLabel"); if (ACompType=="TCxWebCheckBox"){ if (Idx==1){ Jdx=0; } else{ if (Idx%2==0){ Jdx=1; } else{ Jdx=0; TopOffSet++;} } } if (ACompType=="TCxWebComboBox"){ if (Idx>1){ Jdx=0; TopOffSet++; } } if (ACompType=="TCxWebEdit"){ if (PrevCompType!=ACompType) TopOffSet=TopOffSet-ComboControlCount; if (Idx>1){ Jdx=1; TopOffSet++; } } ALabel.Top = PanelTop + (TopOffSet*TopGap) + 25; ALabel.Height = 25; ALabel.AutoSize = false; ALabel.Width = 225; ALabel.Left = MiddleGap*Jdx+100+ ALeftOffSet; ALabel.Name = "lbl_" + Idx; ALabel.Caption = Form.Get2ParamVal("SpecialOptionDesc", Idx); ALabel.Styles.Default = Form.LabelDefStyle; ALabel.Styles.Hover = Form.LabelHoverStyle; ALabel.Alignment = Form.LabelAlignment; var AComp = Form.CreateComponent(ACompType); AComp.Name = Form.Get2ParamVal("SpecialOptionName", Idx); AComp.Top = PanelTop + (TopOffSet*TopGap) + 25; AComp.Height = 25; AComp.Width = 45; AComp.Left = MiddleGap*Jdx+335+ ALeftOffSet; if (ACompType=="TCxWebCheckBox"){ AComp.Checked = Form.GetBoolParamVal("SpecialOptionDefValue", Idx); AComp.Caption = ''; AComp.Styles.Default = Form.CBoxDefStyle; AComp.Styles.Hover = Form.CBoxHoverStyle; } if (ACompType=="TCxWebEdit"){ AComp.Text = Form.Get2ParamVal("SpecialOptionDefValStr", Idx); AComp.Width = Form.GetIntParamVal("SpecialOptionControlWidth", Idx); AComp.Styles.Default = Form.EditDefStyle; AComp.Styles.Hover = Form.EditHoverStyle; } if (ACompType=="TCxWebComboBox"){ AComp.Width = Form.GetIntParamVal("SpecialOptionControlWidth", Idx); var ACompItemCount = Form.GetIntParamVal("SpecialOptionPickListCount", Idx); AComp.Styles.Default = Form.ComboDefStyle; AComp.Styles.Hover = Form.ComboHoverStyle; Kdx=1; while (Kdx<=ACompItemCount){ var ACompItem = AComp.Items.Add; ACompItem.Text=Form.Get4ParamVal("SpecialOptionPickList", "value", Idx, Kdx); ACompItem.Value=Form.Get4ParamVal("SpecialOptionPickList", "name", Idx, Kdx); Kdx++; } AComp.ItemIndex=Form.GetIntParamVal("SpecialOptionPickListItemIndex", Idx); } PrevCompType=ACompType; Idx++; } } %> |