Knowledge Base > RichTextBox > Implementation Knowledge Base Home | Login
Search the Knowledge Base
 
Start Search in the Following Category

Setting the Location of RichTextBox Dialogs

The current default location for RichTextBox dialogs like spellchecker and insert link is the centre of the screen and they can’t be moved by the user. If you which to set the location of these to a different screen location then do so by defining a CSS style rule and applying it to your .aspx page.

 

To do this I've applied a stylesheet to my .aspx page using -

link rel="stylesheet" type="text/css" href="StyleSheet1.css"

 

Then in this sheet I have defined a CSS rule – the # denotes that that the following reference is an element ID -

 

#RTB_spellCheckDialog

{

width: 350px !important;

left: 0px !important;

position: absolute !important;

top: 0px !important;

}

 

The !Important declaration means that it overrides the inline style attribute within the element tag. This means that the dialog appears at top left and moving the RichTextBox down the page a little gives me a clear view of the contents.

 

Or to refer to the insert link dialog (you can see the dialog ids in View Source) -

 

#RTB_linkDialog

{

 left: 0px !important;

 position: absolute !important;

 top: 0px !important;

}

 

To refer to all the dialogs by class name -

 

div.RTB_dialog

{

 left: 0px !important;

 position: absolute !important;

 top: 0px !important;

}




Did this page answer your question? If not, try the Forums or contact us.

Copyright Richer Components 2005. All rights reserved. No part of this article may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without the prior written permission of Richer Components. All brand names and product names used in this article are trade names, service marks, trademarks, or registered trademarks of their respective owners.


Knowledge Base Software - myKB.com