|
|
pinEdit
Started by Anasoft Consulting at 06-21-2010 12:16 . Topic has 4 replies.
 
 
|
|
Sort Posts:
|
|
|
|
06-21-2010, 12:16
|
Anasoft Consulting
Joined on 06-20-2010
Posts 3
|
A couple of problems...they are probably newbie issues :)
|
|
|
|
|
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
|
|
|
|
06-22-2010, 8:51
|
Pintexx Support
Joined on 08-30-2005
Posts 1.910
|
Re: A couple of problems...they are probably newbie issues :)
|
|
|
|
|
Hello,
1) Do you set mode in ready event ? Please try to set earlier e.g. in Form_load.
2) Please use XML toolbar feature
3) EditSetDefaultFont sets the default font in EDIT window. If you now switch to Preview window you should have excatly the same output as in EDIT window.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
06-22-2010, 9:13
|
Anasoft Consulting
Joined on 06-20-2010
Posts 3
|
Re: A couple of problems...they are probably newbie issues :)
|
|
|
|
|
Hi Hans-Peter,
1. I understand what you are saying, but it doesn't quite apply in our case. In our application the form is loaded already and we create new TabPages in a tab control where we display the html editor. Tabs are created and deleted when user wants. Does that make sense? And currently, when the user moves between files in a tree structure they have built, every change has this toolbar appear and then disappear.
2. Understood - thx.
3. What you say is absolutely correct and that is what we are seeing. The problem occurs when the user is moving between files in the tree...not going into EDIT at all. What we are seeing is that if we invoke Preview mode we are seeing something different to when we select the Preview tab in the editor.
Thanks,
Chris
|
|
|
|
|
Report
|
|
|
|
06-23-2010, 10:07
|
Pintexx Support
Joined on 08-30-2005
Posts 1.910
|
Re: A couple of problems...they are probably newbie issues :)
|
|
|
|
|
Hi Chris,
do you load HTML files or do you set the HTML string ?
Are you already in PREVIEW mode when you are loading files ?
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
06-24-2010, 9:26
|
Anasoft Consulting
Joined on 06-20-2010
Posts 3
|
Re: A couple of problems...they are probably newbie issues :)
|
|
|
|
|
Hi Hans-Peter,
I have sent you the code to see how we are using the control.
Thanks,
Chris
|
|
|
|
|
Report
|
|
|
|
|
|