Results 1 to 7 of 7

Thread: Automatically wrap long window titles

  1. #1

    Default Automatically wrap long window titles

    Hello,

    Is there a way to automatically wrap long window titles.

    Thanks,
    Sandhya

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    The window css and height calculation code are not made for that. You would have to fix both.

  3. #3

    Default

    Thanks Condor. You mean I must override the css (for instance x-window-header-text) ?

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    I'm confused. I just tested and the window title already wraps:
    Code:
    Ext.onReady(function(){
    	new Ext.Window({
    		title: 'Very very very very very very very very very long title',
    		width: 200,
    		height: 100
    	}).show();
    });
    Did you mean something different?

  5. #5

    Default

    sorry...I see that it already works too. The problem is with a custom CSS class I am using. The class is something like mentioned below :

    .test {
    color: #757575;
    font-size: 1.4em;
    float: left;
    padding: 0 5px 0 30px;
    }

  6. #6
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    with your example the title will break in second line. I think the question was to behave like os windows where there is an hidden overflow.

    there is the possibility with "white-space:nowrap;" but as it is a span inside the div it will lead to problems with the buttons.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  7. #7
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    float:left won't wrap, unless you give it a fixed width.

    You'll need to add code to the onResize method to update the title div with a width.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •