-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathComboBox.razor
143 lines (141 loc) · 5.94 KB
/
ComboBox.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
@using DataJuggler.UltimateHelper
@using DataJuggler.Blazor.Components.Enumerations
@using BlazorStyled
@using System.Drawing
<Styled @bind-Classname=@ContainerStyle>
text-align: left;
height: @ControlHeightStyle;
min-height: @ControlHeightStyle;
max-height: @ControlHeightStyle;
width: @ControlWidthStyle;
min-width: @ControlWidthStyle;
max-width: @ControlHeightStyle;
position: @Position;
top: @TopStyle;
left: @LeftStyle;
display: @Display;
justify-content: left;
gap: 0px;
z-index: @ZIndex;
</Styled>
<Styled @bind-Classname=@ListItemContainer>
font-family: @FontName
font-size: @FontSizeStyle;
text-align: left;
background-color: @ListBackgroundColorName;
width: @ListItemWidthStyle;
min-width: @ListItemWidthStyle;
max-width: @ListItemWidthStyle;
height: @ListContainerHeightStyle;
min-height: @ListContainerHeightStyle;
max-height: @ListContainerHeightStyle;
position: @ListItemPosition;
color: @ListItemTextColorName;
left: @ListItemLeftStyle;
top: @ListItemTopStyle;
border-width: 1px;
border-color: gray;
border-style: solid;
overflow: visible;
</Styled>
<Styled @bind-Classname=@ListItemStyle>
position: @Position;
width: @ListItemWidthStyle;
min-width: @ListItemWidthStyle;
height: @ListItemHeightStyle;
cursor: pointer;
</Styled>
<Styled @bind-Classname=@ButtonStyle>
display: inline;
text-align: left;
background-size: 100% 100%;
height: 25.6px;
position: @ButtonPosition;
left: @ButtonLeftStyle;
top: @ButtonTopStyle;
cursor: pointer;
z-index: @ZIndex;
</Styled>
<Styled @bind-Classname=@CheckedListBoxStyle>
position: @CheckedListPosition;
height: @CheckedListheightStyle;
min-height: @CheckedListheightStyle;
max-height: @CheckedListheightStyle;
width: @CheckedListWidthStyle;
max-width: @CheckedListWidthStyle;
min-width: @CheckedListWidthStyle;
left: @CheckedListLeftStyle;
top: @CheckedListTopStyle;
overflow: visible;
</Styled>
<Styled @bind-Classname=@ListContainerStyle>
display: @ListDisplay;
position: @ListContainerPosition;
left: @ListContainerLeftStyle;
top: @ListContainerTopStyle;
z-index: @ZIndexPlus10;
width: @ListItemWidthStyle;
min-width: @ListItemWidthStyle;
max-width: @ListItemWidthStyle;
height: @ListContainerHeightStyle;
min-height: @ListContainerHeightStyle;
max-height: @ListContainerHeightStyle;
</Styled>
<div class="@ContainerStyle @ClassName textdonotwrap" tabindex="0" @onblur="HandleOnBlur">
<table>
<tr class="textdonotwrap">
<td width="@TextBoxWidth">
<TextBoxComponent Name="DisplayTextBox" Caption="@LabelText" Parent="this"
ClassName="displayinline" Column1Width="@Column1Width"
LabelLeft="@LabelLeft" LabelTop="@labelTop" NotifyParentOnBlur="@NotifyParentOnBlur"
Column2Width="@Column2Width" TextBoxWidth="@TextBoxWidth" Height="@TextBoxHeight"
LabelFontName="@LabelFontName" LabelFontSize ="@LabelFontSize" Left="@TextBoxLeft"
LabelColor="@LabelColor.Name" OnTextChangedCallback="OnTextChanged"
TextBoxFontSize="@TextBoxFontSize" TextBoxFontName="@TextBoxFontName"
SendAllTextToParent=true Text="@SelectedText" Enabled="@TextBoxEnabled"
Width="@Width" LabelClassName="@LabelClassName" ZIndex="@ZIndexPlus20">
</TextBoxComponent>
</td>
@if (ShowButton)
{
<td width="@Column2Width">
<ImageButton ClassName="@ButtonStyle" ButtonNumber="1" HeightUnit="px"
Height="@ButtonHeight" Unit="px" Width="@ButtonWidth" Name="CalendarButton"
Position="@ButtonPosition" ZIndex="@ZIndexPlus30" Left="@ButtonLeft" Top=@ButtonTop
ImageUrl="@ButtonUrl" Parent="this" ClickHandler="@ButtonClicked">
</ImageButton>
</td>
}
</tr>
</table>
<div class="@ListContainerStyle">
@if (CheckListMode)
{
<div class="@CheckedListBoxStyle">
<CheckedListBox Parent="this" HeightUnit="@CheckedListHeightUnit" Height="@CheckedListheight"
Position="@CheckedListPosition" Unit="@CheckedListUnit" Width=@CheckedListWidth
ListItemWidth=@ListItemWidth ListItemHeight="@ListItemHeight" ListItemLeft=@CheckedListItemLeft
ListItemTop="@CheckedListItemTop" ListItemBackgroundColor=@ListItemBackgroundColor
CheckBoxTextXPosition="@CheckBoxTextXPosition" CheckBoxTextYPosition="@CheckBoxTextYPosition"
Top="0" ZIndex="@ZIndexPlus10" ListItemMarginBottom="@ListItemMarginBottom"
NotifyParentOnBlur="true" SetFocusOnFirstRender="true"
CheckBoxHeight="@CheckBoxHeight" CheckBoxwidth="@CheckBoxWidth"
CheckBoxXPosition=@CheckBoxXPosition CheckBoxYPosition="@CheckBoxYPosition"
Left=@CheckedListLeft ListItemClassName="@ListItemClassName" ClassName="@CheckedListClassName">
</CheckedListBox>
</div>
}
else
{
<div class="@ListItemContainer @DropdownClassName">
<select class="form-control" name="ListBox" size="@VisibleCount"
id="ComboBoxListBox" @onchange="SelectionChanged">
@foreach (Item item in Items)
{
<option class="@ListItemStyle nopadding" >@item.Text</option>
}
</select>
</div>
}
</div>
</div>