[CLOSED] I can not get scroll for HtmlEditor

  1. #1

    [CLOSED] I can not get scroll for HtmlEditor

    Hi

    I can not get the scroll for htmleditor.. I have tried to add in a panel with autoscroll=true, and in this example I have put it in a container.
    For the gridpanel in this example, the scroll works fine when needed. But not for the htmleditor.
    (I striped down the code to hopefully make it more clear)

    I guess it is a easy misstake I made, but I can just not find it :)

    Best regards
    Micael

    
    <Window>
                <ext:Window ID="win_uc_cases" runat="server"
                     IconCls="x-mss-inbox-small"
                    Width="1000" 
                    Height="700"                
                    Layout="Border" Maximizable="true" Minimizable="true" Closable="false" 
                    
                    Title="MSS Inbox" LazyMode="Instance" Modal="false">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server">
                            <Items>
                                
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
    
                    <Items>
                                <ext:TreePanel 
                                    ID="treeCaseFilter" 
                                    runat="server" 
                                    Title="Case Filters"
                                    Icon="BrickMagnify"
                                    Height="300"
                                    Width="170"
                                    UseArrows="true"
                                    AutoScroll="true"
                                    Animate="true"            
                                    RootVisible="false" 
                    Region="West">
                      
                             </ext:TreePanel>
    
    
                            <ext:GridPanel ID="GridPanel1" runat="server"
                                Border="false" Region="Center" Split="true" AutoScroll="true" SelectionMemory="false" >
                            </ext:GridPanel>
                             
                             <ext:Container ID="Container1" runat="server" Layout="AnchorLayout" AutoScroll="true" Region="South" Split="true">
                                <Items>
                                        <ext:HtmlEditor  runat="server" ID="lblHtmlEditor" ItemID="lblHtmlEditor"   Anchor="100% 100%"  ReadOnly="false"  ></ext:HtmlEditor>   
                                </Items>
                            </ext:Container>
                            
    
                    </Items>
                </ext:Window>
    Last edited by Daniil; Jan 22, 2014 at 3:18 AM. Reason: [CLOSED]
  2. #2
    Hi @waxby,

    A vertical scrollbar appears for me when I type some amount of lines therein.

    Click image for larger version. 

Name:	Scroll.JPG 
Views:	11 
Size:	46.0 KB 
ID:	7513

    So, I don't understand the problem. Please elaborate.
  3. #3
    Hi Daniil
    What I noticed now is that before I select anything in the Gridview, I have an editable htmleditor, and when typing text, scroll appears like you tested.
    However, when selecting a row in the gridview, I do the folloing in codebehind:

    lblHtmlEditor.Html = "<br/><br/>" + sTheHtmlBodyToShow;





    ... and no scroll appears, and it seem like it goes to readyonly mode.
    Last edited by waxby; Jan 21, 2014 at 3:17 PM.
  4. #4
    Also, please replace
    lblHtmlEditor.Html = "html";
    with
    lblHtmlEditor.SetValue("html");
    Also please set Height or Flex setting for the Container1. The south region requires either of those settings, see "Notes" here:
    http://docs.sencha.com/extjs/4.2.1/#...ntainer.Border
  5. #5
    Hi!
    .SetValue() was the trick. It works as supposed. However I do not understand why .html = "html" does not work.

    Case closed :)

    Best regards
    Micael
  6. #6
    You can use the Text property as well.
    lblHtmlEditor.Text = "html";
    An HtmlEditor is a field. Like a TextField. You don't use a TextField's Html. The same policy for an HtmlEditor.

    The Html property is for another purposes and, generally speaking, should not be used for fields.

Similar Threads

  1. Replies: 8
    Last Post: Jun 06, 2013, 12:42 PM
  2. [CLOSED] HtmlEditor scroll problem
    By vzx in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 07, 2013, 6:29 AM
  3. [CLOSED] ListView with HtmlEditor -> HtmlEditor value is null
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 17, 2012, 12:50 AM
  4. Unable to scroll ???
    By mlafleur in forum 1.x Help
    Replies: 3
    Last Post: Oct 01, 2011, 7:39 PM
  5. grid scroll
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Nov 17, 2009, 1:47 AM

Posting Permissions