Telerik Forums
UI for WinForms Forum
1 answer
689 views
I have a custom theme (.tssp file) that is an exact copy of the built-in Windows7 theme.  I have a RadForm with a StatusStrip.  The StatusStrip contains a ToolStripStatusLabel.  I need to change the default BackColor of the ToolStripStatusLabel in VisualStyleBuilder but I cannot figure out how to do it.

Please help!

Thanks
Anton
Telerik team
 answered on 10 Jan 2013
1 answer
124 views
I am using IncrementParagraphLeftIndent() to increase the left margin. When I export using the html provider I can see the margin has been set in the Style for that run.

<style type="text/css">
.p_6F87C71A { margin: 0px 0px 0px 28px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; } 
</style><p class="p_6F87C71A"><span class="s_6BF1D20F">This text should be indented</span></p>

However, when I import using the html provider the margin setting is lost. When I export again I can see the margin is set to 0.

<style type="text/css">
.p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; } 
</style><p class="p_384D933F"><span class="s_6BF1D20F">This text should be indented</span></p>

Here's the code I'm using for Import/Export:


        private static HtmlFormatProvider _htmlFormatProvider;
 
        private static void InitHtmlFormatProvider()
        {
            _htmlFormatProvider = new HtmlFormatProvider();
            var htmlExportSettings = new HtmlExportSettings();
            htmlExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
            _htmlFormatProvider.ExportSettings = htmlExportSettings;
        }
 
        private void commandBarButtonLoad_Click(object sender, EventArgs e)
        {
            string text = File.ReadAllText(@"c:\temp\RichText.txt");
            RadDocument document = _htmlFormatProvider.Import(text);
            radRichTextBox1.Document = document;
        }
 
 
        private void commandBarButtonSave_Click(object sender, EventArgs e)
        {
            string html = _htmlFormatProvider.Export(radRichTextBox1.Document);
            File.WriteAllText(@"c:\temp\RichText.txt", html);            
        }
     

Plamen
Telerik team
 answered on 10 Jan 2013
3 answers
217 views
Hello.

Very nice looking Bookshelf demo application screenshots are everywhere on site, but there are screenshots only.
I would like to create app that looks like Bookshelf demo app. Could you attach sample project with main form looks like main form of Bookshelf, so I can use it as a base for my MetroUI-style app.

Thanks.
Jack
Telerik team
 answered on 10 Jan 2013
3 answers
186 views
Hi... i'm having a problem when i set a datasource to a cell with one GridViewComboBoxColumn... when i set the datasource = null or with 0 elements... all the rows that have the GridViewComboBoxColumn clear the datasource... 

i'm using a code like this

((Telerik.WinControls.UI.GridViewComboBoxColumn)(cell.RowInfo.Cells["NameCell"].ColumnInfo)).DataSource = listElements;

listElements is a List<Object> that have 0 items... and clear all the cells in all the rows

Cheers!
Stefan
Telerik team
 answered on 10 Jan 2013
2 answers
129 views
Please refer to attached images for clarification if needed.

I have a couple of GridViewMaskBoxColumns in child rows of my RadGridView control. I'm setting the TextAlignment of the column to MiddleCenter (see GridViewMaskBoxColumn_1.jpg). This sets the alignment of the displayed value as expected.

However, I would also like data to be centered when editing the data. As GridViewMaskBoxColumn_2.jpg show the data is left aligned.

I've tried to create a custom editor but the examples I've found here are a little over my head, in C# and don't seem to relate to what I'm wanting to do anyway.

Can someone show me how to either get to the property I need to set or else show me how (in VB.NET) to create a custom editor that would do this for me.

Thanks.
Timothy
Top achievements
Rank 1
 answered on 09 Jan 2013
2 answers
281 views
I'm having trouble setting the background color for the Wizard Page Header. It seems all the combinations of "on form load" don't make a difference and keep the color an aqua blue color. What are the steps to override the background color of the header?
Adam
Top achievements
Rank 1
 answered on 09 Jan 2013
3 answers
98 views
Hi,

It seems that Redo method is acting like Undo method.
Maybe I'm doing something wrong?
private void btnRedo_Click(object sender, System.EventArgs e)
       {
           _richTextBox.Redo();
           _richTextBox.Focus();
       }
Stefan
Telerik team
 answered on 09 Jan 2013
1 answer
285 views
Hi Telerik,

I create several windows in a RadDock Container.  Say 3 DocumentWindows all tabbed nicely.  The user moves these documents around and then selects from a menu "Re-Tab All Documents".   How can i programmatically re-dock (re-tab) floating windows to their RadDock container ?
Thank You,
Josh
Plamen
Telerik team
 answered on 09 Jan 2013
1 answer
176 views
I have a variety of actions that need to take place prior to NodeRemoved event firing.  I will typically use the Gridview_RowsChanging, NotifyCollectionChangedAction.Replace or NotifyCollectionChangedAction.Remove (as an example) which work well and I'm looking for something similar to capture the action of a treeview  context menu (Add/Delete).

Any thoughts?
Stefan
Telerik team
 answered on 09 Jan 2013
1 answer
120 views
UPDATE: I fixed this by loading the html string directly instead of first converting to a byte array.

So this:
    string text = File.ReadAllText(@"c:\temp\RichText.txt");
    Byte[] convertedText = Encoding.ASCII.GetBytes(text);
    RadDocument document = _htmlFormatProvider.Import(convertedText);

became this:
    string text = File.ReadAllText(@"c:\temp\RichText.txt");
    RadDocument document = _htmlFormatProvider.Import(text);





When I save and reload using an HtmlFormatProvider I get strange results with Tab characters.

Here is an example where the original text is "a<tab>b<tab>c".

The first time it is saved it looks like this. The tabs have been replaced with two "&nbsp;":
<style type="text/css">
.p_CC664AAA { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; } 
</style><p class="p_CC664AAA"><span class="s_6BF1D20F">a&nbsp; &nbsp; b&nbsp; &nbsp; c</span></p>

After reloading and saving again it looks like this. The two "&nbsp;" have been replaced with whitespace:
<style type="text/css">
.p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; } 
</style><p class="p_384D933F"><span class="s_6BF1D20F">a    b    c</span></p>

After reloading and saving again it looks like this. The whitespaces have been replaced with question marks:
<style type="text/css">
.p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } 
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; } 
</style><p class="p_384D933F"><span class="s_6BF1D20F">a? ? b? ? c</span></p>

Here is the sample code I am using for this test: 
public Form1()
{
    InitHtmlFormatProvider();
    InitializeComponent();
}
 
private static HtmlFormatProvider _htmlFormatProvider;
 
private static void InitHtmlFormatProvider()
{
    _htmlFormatProvider = new HtmlFormatProvider();
    var htmlExportSettings = new HtmlExportSettings();
    htmlExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
    _htmlFormatProvider.ExportSettings = htmlExportSettings;
}
 
private void commandBarButtonLoad_Click(object sender, EventArgs e)
{
    string text = File.ReadAllText(@"c:\temp\RichText.txt");
    Byte[] convertedText = Encoding.ASCII.GetBytes(text);
    RadDocument document = _htmlFormatProvider.Import(convertedText);
    radRichTextBox1.Document = document;
}
 
private void commandBarButtonSave_Click(object sender, EventArgs e)
{
    string html = _htmlFormatProvider.Export(radRichTextBox1.Document);
    File.WriteAllText(@"c:\temp\RichText.txt", html);           
}


Svett
Telerik team
 answered on 09 Jan 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?