Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [C#] Controllo da..."controllare"

    Salve a tutti!

    Ho un controllino web costituito da una Table, n TableRow e m TableColumn.

    Quando l'utente va col mouse sopra una riga viene attivato un javascript che attiva il bordo ed un bottoncino al lato della riga, facendo in modo che l'utente possa interagire cliccando su quel bottoncino.

    Il problema nasce perchè per righe molto lunghe, il testo nella riga va a capo (quando viene attivata la funzione onmouseover).

    Come poter fare per evitare ciò?
    Ho sentito parlare di noWrap ma non ho idea di come si usi...chi può aiutarmi?

    Ecco la riga "incriminata":

    (essa è contenuta in una Tabella contenitore):


    codice:
    Table tableDescription = new Table();
                tableDescription.CellPadding = 1;
                tableDescription.CellSpacing = 0;
                tableDescription.Attributes.Add("onmouseover", String.Format("this.className = '{0}'; this.rows(0).cells(1).className = '{1}'; this.rows(0).cells(1).childNodes(0).style.display = 'block';", this._cssClasses.GetString("SelectedItem"), this._cssClasses.GetString("MenuImageCell")));
                tableDescription.Attributes.Add("onmouseout", String.Format("this.className = '{0}'; this.rows(0).cells(1).className = '{1}'; this.rows(0).cells(1).childNodes(0).style.display = 'none';", this._cssClasses.GetString("UnselectedItem"), String.Empty));
                tableDescription.CssClass = this._cssClasses.GetString("UnselectedItem");
    
                TableRow rowDescription = new TableRow();
    
                this._taskDescriptionCell = new TableCell();
                this._taskDescriptionCell.CssClass = this._cssClasses.GetString("ItemDescription");
                this._taskDescriptionCell.Style.Add(HtmlTextWriterStyle.Width, "100%");
    
                this._lnkTaskDescription = new HyperLink();
                this._lnkTaskDescription.Style.Add(HtmlTextWriterStyle.FontFamily, "Tahoma");
                this._lnkTaskDescription.Style.Add(HtmlTextWriterStyle.FontSize, "8pt");
                this._taskDescriptionCell.Controls.Add(this._lnkTaskDescription);
    
                this._taskMenuIconCell = new TableCell();
                this._taskMenuIconCell.Style.Add(HtmlTextWriterStyle.Width, "13px");
    
                HtmlImage imgMenuIcon = new HtmlImage();
                imgMenuIcon.Src = this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "COPERGMPS.AA.BPM.UI.Web.Resources.Images.MenuIcon.gif");
                imgMenuIcon.Style.Add(HtmlTextWriterStyle.Display, "none");
    
                this._taskMenuIconCell.Controls.Add(imgMenuIcon);

  2. #2
    Utente di HTML.it L'avatar di albgen
    Registrato dal
    Jun 2005
    Messaggi
    3,249
    forse era meglio se aprivi la discussione nella sezione asp net...
    I got the remedy

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.