Hi Telerik
I'm using the following code to add button to the tabstrip at the top of some of the tool windows in my RadDock. The button adds no problem and the events for the button work fine. I would like the button to appear at the right hand edge off the tabstrip rather than its position at the moment (which is just after the image I am also adding). See the attached screenshot.
How can I move the button to the Righthand side of the tabstrip?
Many thanks in advance
Regards
Ian Carson
I'm using the following code to add button to the tabstrip at the top of some of the tool windows in my RadDock. The button adds no problem and the events for the button work fine. I would like the button to appear at the right hand edge off the tabstrip rather than its position at the moment (which is just after the image I am also adding). See the attached screenshot.
How can I move the button to the Righthand side of the tabstrip?
Many thanks in advance
Regards
Ian Carson
public
void
SetToolWindowElements()
{
foreach
(ToolWindow tw
in
rdockMain.DockWindows)
{
if
(tw != twTemplates && tw != twExecutables && tw != twEquityFunds && tw != twInstrumentLibrary && tw != twScheduleLibrary)
continue
;
var iconImage =
new
ImagePrimitive {Image = Resources.alpha_logo24};
//, Padding = new Padding(4, 0, 3, 0)};
var refreshButton =
new
RadButtonElement {Image = Resources.Refresh20, ImageAlignment = ContentAlignment.MiddleCenter};
tw.TabStrip.Height = 28;
if
(tw == twInstrumentLibrary)
{
refreshButton.Click += InstrumentLibraryRefresh;
}
else
if
(tw == twEquityFunds || tw == twScheduleLibrary)
{
refreshButton.Click += ScheduleEquityLibraryRefresh;
}
if
(((ToolTabStrip) tw.TabStrip).CaptionElement.Children[2].Children[0].GetType() !=
typeof
(ImagePrimitive))
{
((ToolTabStrip) tw.TabStrip).CaptionElement.Children[2].Children.Insert(0, iconImage);
}
if
(tw != twEquityFunds && tw != twInstrumentLibrary && tw != twScheduleLibrary)
continue
;
if
(((ToolTabStrip)tw.TabStrip).CaptionElement.Children[2].Children[4].GetType() !=
typeof
(RadButtonElement))
{
((ToolTabStrip)tw.TabStrip).CaptionElement.Children[2].Children.Insert(4, refreshButton);
}
}
}