06-20-2010, 10:45
|
Anasoft Consulting
Joined on 06-20-2010
Posts 3
|
2 problems...I'm sure they are trivial - with Preview and toolbar
|
|
|
|
|
1. Whenever I switch to Preview mode (a read only view for the end user), the toolbar flashes up then vanishes as the page is rendered. The more complex the page, the longer this appears...it really doesn't look very polished. The code we are using is this:
public bool IsReadonly
{
get
{
return _isReadonly;
}
set
{
if (_isReadonly == value)
{
return;
}
_isReadonly = value;
var newMode = value
? pinEditWinFormControl.enMode.Preview
: pinEditWinFormControl.enMode.Edit;
if (!html.ReadyState)
{
Debug.WriteLine("Need to set mode but not ready. NewMode " + newMode);
_needToSetMode = true;
_modeToBeSet = newMode;
return;
}
Debug.WriteLine("New mode set. Newmode = " + newMode);
_needToSetMode = false;
html.Mode = newMode;
}
}
private void html_Ready(object sender)
{
if (_needToSetMode)
{
html.Mode = _modeToBeSet;
_needToSetMode = false;
}
}
2. Also, I'd like to hide buttons from the toolbar (like Save, New etc). Any tips on how to do this?
3. Finally, when I edit the page, and click on the preview tab, the font used is Arial (the way I want). When I use the code above, it displays in Times Roman. Am I missing something here? The code we are using to set this is:
html.ForeColor = Settings.PluginCore.PTSettings.HtmlEditorDefaultForeColor;
html.EditSetDefaultFont(
Settings.PluginCore.PTSettings.HtmlEditorDefaultFont,
Settings.PluginCore.PTSettings.HtmlEditorDefaultFontSize.ToString());
Hope someone can help!
(hmm...I previewed this message and I didn't have the carriage returns? I hope it posts correctly)
Thanks,
Chris
|
|
|
|
|
Report
|
|
|
|