Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    riuppo questo 3D con un quesito:
    e' possibile fare interpretare ad un campo con embed = true i vari tag HTML tipo bold, italic , etc etc ??? ...


    ... ci ho provato ma non so perche' non lo fa , grazie.
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    (si apre una discussione nuova)

    La risposta è si, basta incorporare anche i caratteri per il bold e quelli per l'italic..

  3. #3
    Ok, il pezzo mancante e che non riuscivo a trovare era
    setNewTextFormat()
    piuttosto che
    setTextFormat()

    Per chi fosse interessato la procedura da me adottata e' stata la seguente:

    creo in libreria 3 nuove font da esportare:
    1 - linkage "Verdana1" font Verdana senza niente
    2 - linkage "Verdana2" font Verdana solo bold
    3 - linkage "Verdana3" font Verdana solo italic

    poi nel campo di testo dinamico ho assegnato il primo o uno qualunque dei linkage usati tramite setNewTextFormat ... il solo setTextFormat vedrete che non funziona.

    codice:
    txt.embedFonts = true;
    txt.htmlText = "ciao a tutti quanti";
    
    var txtFmt1:TextFormat = new TextFormat();
    txtFmt1.font = new String("Verdana1");
    
    txt.setNewTextFormat(txtFmt1);

    Grazie a negatyve e ciao a tutti.
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  4. #4
    domanda fagiana:
    perche' la cosa testata qui sopra e funzionante non dovrebbe andare con campi di testo creati dinamicamente ???

    in libreria ho i 3 fonts esportati con nomi differenti senza spazi e linkages differenti ( "FA", "FB", "FC" )

    .... questo e' il codice:
    codice:
    this.createTextField("txt", 1, 10, 10, 300, 200);
    this["txt"].html = true;
    this["txt"].border = true;
    this["txt"].borderColor = 0x000000;
    this["txt"].embedFonts = true;
    this["txt"].htmlText = "ciao a tutti quanti";
    
    
    var myTF1:TextFormat = new TextFormat();
    myTF1.font = "FA";
    this["txt"].setNewTextFormat(myTF1);

    non va e non capisco perche' .... se mettessi semplicemente
    setTextFormat allora funzionerebbe senza problemi ...
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  5. #5

    conclusione:

    sono un fagiano ... non bisogna usare il nome del linkage ma il nome vero e proprio del font, tipo Verdana....



    .... il setNewTextFormat non c'entrava niente



    scusate le imprecisazioni multiple di questo 3D, saluti.
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  6. #6
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

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.