rem: eventTitleLabel.setAttribute( "crop", "end" ); eventTitleLabel.setAttribute( "flex", "1" ); 
context: DayView.prototype.createEventBox = function dayview_createEventBox( calendarEventDisplay ) {   //if you change this class, you have to change calendarViewDNDObserver in calendarDragDrop.js   var displayDateObject = new Date( calendarEventDisplay.displayDate );   var startHour = displayDateObject.getHours();   var startMinutes = displayDateObject.getMinutes();   var eventDurationHours = ( ( calendarEventDisplay.displayEndDate                                 - calendarEventDisplay.displayDate )                               / ( kDate_MillisecondsInHour ) );      var startHourTreeItem = document.getElementById( "day-tree-item-"+startHour );      var hourHeight = startHourTreeItem.boxObject.height;   var hourWidth = startHourTreeItem.boxObject.width;   var eventSlotWidth = Math.round( ( hourWidth - kDayViewHourLeftStart )                                     / calendarEventDisplay.totalSlotCount );   var eventLocation = calendarEventDisplay.event.location;   //calculate event dimensions   var eventTop = startHourTreeItem.boxObject.y -                  startHourTreeItem.parentNode.boxObject.y +                  Math.round( hourHeight * startMinutes/ 60 ) - 1;   var eventLeft = kDayViewHourLeftStart + ( calendarEventDisplay.startDrawSlot * eventSlotWidth );   var eventHeight = Math.round( eventDurationHours * hourHeight ) + 1;   var eventWidth = ( calendarEventDisplay.drawSlotCount * eventSlotWidth ) - 1;      // create title label, location label and description description :)   var eventTitleLabel = document.createElement( "label" );   eventTitleLabel.setAttribute( "class", "day-view-event-title-label-class" );   eventTitleLabel.setAttribute( "crop", "end" );   eventTitleLabel.setAttribute( "flex", "1" );   if( eventLocation )       eventTitleLabel.setAttribute( "value", calendarEventDisplay.event.title + " (" + eventLocation + ")" );   else      eventTitleLabel.setAttribute( "value", calendarEventDisplay.event.title );   var eventText = document.createTextNode( calendarEventDisplay.event.description );   var eventDescription = document.createElement( "description" );   eventDescription.setAttribute( "class", "day-view-event-description-class" );   eventDescription.appendChild( eventText );   //create actual eventbox   var eventBox = document.createElement( "vbox" );   eventBox.calendarEventDisplay = calendarEventDisplay;   eventBox.setAttribute( "name", "day-view-event-box-"+calendarEventDisplay.event.id );   // set the event box to be of class day-view-event-class and the appropriate calendar-color class   this.setEventboxClass( eventBox, calendarEventDisplay.event, "day-view");   eventBox.setAttribute( "top", eventTop );   eventBox.setAttribute( "left", eventLeft );   eventBox.setAttribute( "height", eventHeight );   eventBox.setAttribute( "width", eventWidth );      eventBox.setAttribute( "flex", "1" );   eventBox.setAttribute( "eventbox", "dayview" ); // ?      eventBox.setAttribute( "onclick", "dayEventItemClick( this, event )" );   eventBox.setAttribute( "ondblclick", "dayEventItemDoubleClick( this, event )" );   eventBox.setAttribute( "onmouseover", "gCalendarWindow.changeMouseOverInfo( calendarEventDisplay, event )" );   eventBox.setAttribute( "tooltip", "eventTooltip" );   eventBox.setAttribute( "ondraggesture", "nsDragAndDrop.startDrag(event,calendarViewDNDObserver);" );   eventBox.setAttribute( "ondragover", "nsDragAndDrop.dragOver(event,calendarViewDNDObserver)" );   eventBox.setAttribute( "ondragdrop", "nsDragAndDrop.drop(event,calendarViewDNDObserver)" );      // mark the box as selected, if the event is   if( this.calendarWindow.EventSelection.isSelectedEvent( calendarEventDisplay.event ) )      eventBox.setAttribute( "eventselected", "true" );      eventBox.appendChild( eventTitleLabel );   eventBox.appendChild( eventDescription );      return eventBox;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a52269365017fb2215f9299a3542a63eeef34a3e/dayView.js/clean/calendar/resources/content/dayView.js