Hi,
I generate create a EditorToolGroup in code behind like this:
The dropdowns are filled as expcted, but the dropdown should display my ImgUrl Icon, not te .Text property...
I prefer to use the EditorSplitButton, but it has the same problem: no icon image! I'm sure the path to the icon is correct, since the items are filled properly... What am I doing wrong here?
TIA,
Alex
I generate create a EditorToolGroup in code behind like this:
Public
Shared
Sub
AddEditorToolbarGroup(
ByRef
ed
As
RadEditor)
Dim
tg
As
New
EditorToolGroup
tg.Tag =
"EmoticonsGroup"
AddIconsDropDown(tg, EtnicGroup.Afro)
AddIconsDropDown(tg, EtnicGroup.Hindi)
AddIconsDropDown(tg, EtnicGroup.Java)
AddIconsDropDown(tg, EtnicGroup.Indian)
AddIconsDropDown(tg, EtnicGroup.China)
AddIconsDropDown(tg, EtnicGroup.Bakra)
ed.Tools.Add(tg)
End
Sub
Private
Shared
Sub
AddIconsDropDown(
ByRef
etg
As
EditorToolGroup,
ByVal
etnicity
As
String
)
Dim
smileys
As
Dictionary(Of
String
,
String
) = EtnicSmileys(etnicity)
'Dim sp As EditorSplitButton = New EditorSplitButton("Emoticons_" + etnicity)
'sp.Text = "Emoticons_" + etnicity
'sp.ImageUrl = "Smiley/Smiley_Afro_Happy.gif"
'For Each smiley As KeyValuePair(Of String, String) In smileys
' Dim img As String = String.Format("<img src='Smiley/{0}.gif' height='22' widht='22' onmouseover='this.width=40;this.height=40;' onmouseout='this.width=22;this.height=22;'>", smiley.Value)
' Dim url As String = String.Format("Smiley/{0}.gif", smiley.Value)
' 'sp1.Items.Add("<img src='icons/1.gif'>", "icons/1.gif");
' sp.Items.Add(New EditorDropDownItem() With {.Name = img, .Value = url})
'Next
'etg.Tools.Add(sp)
Dim
edd
As
EditorDropDown =
New
EditorDropDown()
With
{.Name =
"Emoticons_"
+ etnicity, _
.Text =
"Emoticons_"
+ etnicity, _
.Width = Unit.Pixel(22), _
.ImageUrl =
String
.Format(
"./Smiley/Smiley_{0}_Happy.gif"
, etnicity), _
.ItemsPerRow = 6, _
.ShowIcon =
True
, _
.ShowText =
False
_
}
For
Each
smiley
As
KeyValuePair(Of
String
,
String
)
In
smileys
Dim
img
As
String
=
String
.Format(
"<img src='Smiley/{0}.gif' height='22' widht='22' onmouseover='this.width=40;this.height=40;' onmouseout='this.width=22;this.height=22;'>"
, smiley.Value)
Dim
url
As
String
=
String
.Format(
"Smiley/{0}.gif"
, smiley.Value)
'sp1.Items.Add("<img src='icons/1.gif'>", "icons/1.gif");
edd.Items.Add(
New
EditorDropDownItem()
With
{.Name = img, .Value = url})
Next
etg.Tools.Add(edd)
End
Sub
The dropdowns are filled as expcted, but the dropdown should display my ImgUrl Icon, not te .Text property...
I prefer to use the EditorSplitButton, but it has the same problem: no icon image! I'm sure the path to the icon is correct, since the items are filled properly... What am I doing wrong here?
TIA,
Alex