IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SWT/JFace Java Discussion :

TextCellEditor affichage d'un textarea


Sujet :

SWT/JFace Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Inactif  
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    2 189
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2006
    Messages : 2 189
    Par défaut TextCellEditor affichage d'un textarea
    Hello,

    J essaye d'afficher dans mon property sheet d eclipse un textarea qui comporte plusieurs ligne

    j ai essayé

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    new TextCellEditor(parent, SWT.MULTI);
    mais ca m affiche toujours un text qui ne comporte qu une seule ligne

    quelqu un aurait il la solution ?

    Merci

  2. #2
    Inactif  
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    2 189
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2006
    Messages : 2 189
    Par défaut
    j ai également tenter d implementer un nouveau text cell editor qui contient ceci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
     
     protected Control createControl(Composite parent) {
    	        text = new Text(parent, 578);
    	        text.setBackground(parent.getBackground());
    	        GridData gridData = new GridData();
                gridData.widthHint = 400;
                gridData.horizontalAlignment = GridData.FILL;
                gridData.verticalAlignment = GridData.BEGINNING;
                gridData.heightHint = 550;
                text.setLayoutData(gridData);
    	        text.addSelectionListener(new SelectionAdapter() {

  3. #3
    Inactif  
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    2 189
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2006
    Messages : 2 189
    Par défaut
    après recherche il s'avère que ma section doit implémenter AbstractPropertySection et que je dois créer les controls

    j ai fait pour l instant ceci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
     
    public class DocumentationSection extends AbstractPropertySection {
    	/** The documentation label. */
        private CLabel documentationLabel;
     
        /** The textarea. */
    	private Text documentationText;
     
    	/**
             * Gets the property category.
             * 
             * @return PropertyCategory The property category used 
             */
    	protected PropertyCategory getPropertyCategory() {
    		return PropertyCategory.DOCUMENTATION_LITERAL;
    	}
     
    	/**
             * Create the controls of the DocumentationSection.
             * 
             * @param parent
             *                      The parent composite
             * @param aTabbedPropertySheetPage
             *                      The property sheet page
             */
        public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
        	super.createControls (parent, aTabbedPropertySheetPage);
     
        	Composite composite = getWidgetFactory ().createFlatFormComposite (parent);    	    	
    	    FormData formData = new FormData();
    	    formData.left = new FormAttachment (0, STANDARD_LABEL_WIDTH);
    	    formData.right = new FormAttachment (1, 0);
    	    formData.top = new FormAttachment (0, ITabbedPropertyConstants.VSPACE);
    	    documentationLabel = getWidgetFactory ().createCLabel (composite, "Documentation");
    	    documentationLabel.setLayoutData(formData);
     
    	    formData = new FormData();
        	documentationText = new Text(composite, 578);
    	    documentationText.setBackground(parent.getBackground());
    	    formData = new FormData();
    	    formData.height = 150;
    	    formData.width = 400;
    	    documentationText.setLayoutData(formData);        
    	 }
        }
    qui me donne le screen 1

    j aimerais savoir si je peux obtenir une table comme le screen 2 qui comporterait comme dans ce dit screen une colonne Property qui contiendrait un label Documentation et avoir dans la colonne 2 mon textarea

Discussions similaires

  1. Problème d'affichage dans un textarea
    Par Dragonflash dans le forum Balisage (X)HTML et validation W3C
    Réponses: 8
    Dernier message: 29/10/2008, 20h23
  2. affichage dans un textArea
    Par alphonse62 dans le forum JBuilder
    Réponses: 1
    Dernier message: 12/06/2007, 22h32
  3. affichage dans un TextArea
    Par manchzek dans le forum AWT/Swing
    Réponses: 6
    Dernier message: 21/12/2006, 10h14
  4. Problème d'affichage dans un textarea
    Par sam.fet dans le forum ASP
    Réponses: 9
    Dernier message: 16/08/2006, 17h52
  5. <select> <option> et affichage dans un textarea
    Par gazelle dans le forum Général JavaScript
    Réponses: 12
    Dernier message: 05/06/2006, 13h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo