Multiline TitledBorder
I have a title border on a JPanel which is rather thin. I cannot figure out how to make the titled border wrap onto a second line so that longer titles still display fully.
I have been unable to do this so far. Any suggestions? Thanks!
I don't know if you have sorted your issue out, it's been a year :) but here is something that I use.
public class MyTitledBorder extends TitledBorder {
private Point textLoc = new Point();
public MyTitledBorder(LineBorder lineBorder, String title, int left, int top, Font font, Color darkGray) {
super(lineBorder, title, left, top, font, darkGray);
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
Border border = getBorder();
if (getTitle() == null || getTitle().equals("")) {
if (border != null) {
border.paintBorder(c, g, x, y, width, height);
return;
Rectangle grooveRect = new Rectangle(x + EDGE_SPACING, y + EDGE_SPACING,
width - (EDGE_SPACING * 2),
height - (EDGE_SPACING * 2));
Font font = g.getFont();
Color color = g.getColor();
g.setFont(getFont(c));
JComponent jc = (c instanceof JComponent) ? (JComponent) c : null;
FontMetrics fm = SwingUtilities2.getFontMetrics(jc, g);
int fontHeight = fm.getHeight();
int descent = fm.getDescent();
int ascent = fm.getAscent();
int diff;
int stringWidth = SwingUtilities2.stringWidth(jc, fm,getTitle());
Insets insets;
if (border != null) {
insets = border.getBorderInsets(c);
} else {
insets = new Insets(0, 0, 0, 0);
int titlePos = getTitlePosition();
switch (titlePos) {
case ABOVE_TOP:
diff = ascent + descent + (Math.max(EDGE_SPACING,
TEXT_SPACING * 2) - EDGE_SPACING);
grooveRect.y += diff;
grooveRect.height -= diff;
textLoc.y = grooveRect.y - (descent + TEXT_SPACING);
break;
case TOP:
case DEFAULT_POSITION:
diff = Math.max(0, ((ascent / 2) + TEXT_SPACING) - EDGE_SPACING);
grooveRect.y += diff;
grooveRect.height -= diff;
textLoc.y = (grooveRect.y - descent) +
(insets.top + ascent + descent) / 2;
break;
case BELOW_TOP:
textLoc.y = grooveRect.y + insets.top + ascent + TEXT_SPACING;
break;
case ABOVE_BOTTOM:
textLoc.y = (grooveRect.y + grooveRect.height) -
(insets.bottom + descent + TEXT_SPACING);
break;
case BOTTOM:
grooveRect.height -= fontHeight / 2;
textLoc.y = ((grooveRect.y + grooveRect.height) - descent) +
((ascent + descent) - insets.bottom) / 2;
break;
case BELOW_BOTTOM:
grooveRect.height -= fontHeight;
textLoc.y = grooveRect.y + grooveRect.height + ascent +
TEXT_SPACING;
break;
int justification = getTitleJustification();
if (justification == LEADING ||
justification == DEFAULT_JUSTIFICATION) {
justification = LEFT;
} else if (justification == TRAILING) {
justification = RIGHT;
switch (justification) {
case LEFT:
textLoc.x = grooveRect.x + TEXT_INSET_H + insets.left;
break;
case RIGHT:
textLoc.x = (grooveRect.x + grooveRect.width) -
(stringWidth + TEXT_INSET_H + insets.right);
break;
case CENTER:
textLoc.x = grooveRect.x +
((grooveRect.width - stringWidth) / 2);
break;
// If title is positioned in middle of border AND its fontsize
// is greater than the border's thickness, we'll need to paint
// the border in sections to leave space for the component's background
// to show through the title.
if (border != null) {
if (((titlePos == TOP || titlePos == DEFAULT_POSITION) &&
(grooveRect.y > textLoc.y - ascent)) ||
(titlePos == BOTTOM &&
(grooveRect.y + grooveRect.height < textLoc.y + descent))) {
Rectangle clipRect = new Rectangle();
// save original clip
Rectangle saveClip = g.getClipBounds();
// paint strip left of text
clipRect.setBounds(saveClip);
if (computeIntersection(clipRect, x, y, textLoc.x - 1 - x, height)) {
g.setClip(clipRect);
border.paintBorder(c, g, grooveRect.x, grooveRect.y,
grooveRect.width, grooveRect.height);
// paint strip right of text
clipRect.setBounds(saveClip);
if (computeIntersection(clipRect, textLoc.x + stringWidth + 1, y,
x + width - (textLoc.x + stringWidth + 1), height)) {
g.setClip(clipRect);
border.paintBorder(c, g, grooveRect.x, grooveRect.y,
grooveRect.width, grooveRect.height);
if (titlePos == TOP || titlePos == DEFAULT_POSITION) {
// paint strip below text
clipRect.setBounds(saveClip);
if (computeIntersection(clipRect, textLoc.x - 1, textLoc.y + descent,
stringWidth + 2, y + height - textLoc.y - descent)) {
g.setClip(clipRect);
border.paintBorder(c, g, grooveRect.x, grooveRect.y,
grooveRect.width, grooveRect.height);
} else { // titlePos == BOTTOM
// paint strip above text
clipRect.setBounds(saveClip);
if (computeIntersection(clipRect, textLoc.x - 1, y,
stringWidth + 2, textLoc.y - ascent - y)) {
g.setClip(clipRect);
border.paintBorder(c, g, grooveRect.x, grooveRect.y,
grooveRect.width, grooveRect.height);
// restore clip
g.setClip(saveClip);
} else {
border.paintBorder(c, g, grooveRect.x, grooveRect.y,
grooveRect.width, grooveRect.height);
g.setColor(getTitleColor());
drawWrappedTitle(jc, g, getTitle(), textLoc.x, textLoc.y);
g.setFont(font);
g.setColor(color);
private void drawWrappedTitle(JComponent jc, Graphics g, String title, int x, int y) {
String titleTmp = getTitle();
y = y-15;
String leftOverBits = title;
int width = (int) (jc.getSize().getWidth()/6.5);
while(leftOverBits.length() > width){
titleTmp = getNextSting(leftOverBits, width);
leftOverBits = leftOverBits.substring(titleTmp.length(), leftOverBits.length());
y+=15;
SwingUtilities2.drawString(jc, g, titleTmp, x, y);
SwingUtilities2.drawString(jc, g, leftOverBits, x, y+15);
private String getNextSting(String titleTmp, int width) {
if(titleTmp.length() < width) return titleTmp;
return titleTmp.substring(0,titleTmp.substring(0,width).lastIndexOf(" "));
private static boolean computeIntersection(Rectangle dest, int rx, int ry, int rw, int rh) {
int x1 = Math.max(rx, dest.x);
int x2 = Math.min(rx + rw, dest.x + dest.width);
int y1 = Math.max(ry, dest.y);
int y2 = Math.min(ry + rh, dest.y + dest.height);
dest.x = x1;
dest.y = y1;
dest.width = x2 - x1;
dest.height = y2 - y1;
if (dest.width <= 0 || dest.height <= 0) {
return false;
return true;
}
Similar Messages
-
hi, i've create a program that creates a multi JTable, i want the user to input the name of each column, but is the name is too long i want that the name appear in multilines, but i don�t know how to do it someone can help me??PLEASE
here is my code:
/* Poseidon */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import javax.swing.table.*;
* Summary description for Poseidon
*2052102
public class Poseidon extends JFrame
// Variables declaration
private JTabbedPane jTabbedPane1;
private JPanel contentPane, paineltabela, painelgrafo, painelvariavel, paineltarefa;
private JTable tabelavariavel,tabelatarefa, tabelateste;
private JScrollPane scrollvariavel, scrolltarefa;
private int totallinhas, alt, al, linhastarefa,cont, linhas, tamanholinhas,
controlalinhas, index, contastring;
private String variavel;
private JComboBox combobox;
JMenuItem sair, abrir, guardar, miadtarefa, miadvariavel;
JTable [] tabelasvar = new JTable[30];
JFrame w;
// End of variables declaration
public Poseidon()
super("Poseidon");
initializeComponent();
this.setVisible(true);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always regenerated
* by the Windows Form Designer. Otherwise, retrieving design might not work properly.
* Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
* to retrieve your design properly in future, before revising this method.
private void initializeComponent()
JMenuBar barra = new JMenuBar();
setJMenuBar(barra);
TratBarra trat = new TratBarra();
tabelavariavel = new JTable();
tabelatarefa = new JTable();
tabelavariavel.getTableHeader().setReorderingAllowed(false);
tabelavariavel.setModel(new DefaultTableModel());
tabelavariavel.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
tabelavariavel.setBackground(Color.cyan);
tabelatarefa.getTableHeader().setReorderingAllowed(false);
tabelatarefa.setModel(new DefaultTableModel());
tabelatarefa.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
tabelatarefa.setBackground(Color.white);
CaixaCombinacao combobox = new CaixaCombinacao();
DefaultCellEditor editor = new DefaultCellEditor(combobox);
tabelatarefa.setDefaultEditor(Object.class, editor);
painelvariavel = new JPanel();
painelvariavel.setLayout(new GridLayout(1, 0));
painelvariavel.setBorder(new TitledBorder("Variaveis"));
painelvariavel.setBounds(15, 35, 490, 650);
painelvariavel.setVisible(false);
this.add(painelvariavel);
scrollvariavel = new JScrollPane();
scrollvariavel.setViewportView(tabelavariavel);
painelvariavel.add(scrollvariavel);
paineltarefa = new JPanel();
paineltarefa.setLayout(new GridLayout(1,0));
paineltarefa.setBorder(new TitledBorder("Tarefas"));
paineltarefa.setBounds(506, 35, 490,650);
paineltarefa.setVisible(false);
this.add(paineltarefa);
scrolltarefa = new JScrollPane();
scrolltarefa.setViewportView(tabelatarefa);
paineltarefa.add(scrolltarefa);
tamanholinhas = 1;
linhas=1;
cont=0;
JMenu arquivo = new JMenu("Arquivo");
JMenu mtabela = new JMenu("Tabela");
arquivo.setMnemonic(KeyEvent.VK_A);
mtabela.setMnemonic(KeyEvent.VK_T);
miadvariavel = new JMenuItem("Adicionar Variavel");
miadtarefa = new JMenuItem("Adicionar Tarefa");
abrir = new JMenuItem("Abrir");
guardar = new JMenuItem("Guardar");
sair = new JMenuItem("Sair");
sair.addActionListener(trat);
miadvariavel.addActionListener(trat);
miadtarefa.addActionListener(trat);
mtabela.add(miadvariavel);
miadvariavel.setMnemonic(KeyEvent.VK_V);
mtabela.add(miadtarefa);
miadtarefa.setMnemonic(KeyEvent.VK_F);
arquivo.add(abrir);
abrir.setMnemonic(KeyEvent.VK_B);
arquivo.add(guardar);
guardar.setMnemonic(KeyEvent.VK_G);
arquivo.addSeparator();
arquivo.add(sair);
sair.setMnemonic(KeyEvent.VK_S);
barra.add(arquivo);
barra.add(mtabela);
jTabbedPane1 = new JTabbedPane();
contentPane = (JPanel)this.getContentPane();
paineltabela = new JPanel();
painelgrafo = new JPanel();
// jTabbedPane1
jTabbedPane1.addTab("Tabela", paineltabela);
jTabbedPane1.addTab("Grafo", painelgrafo);
jTabbedPane1.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e)
painelvariavel.setVisible(false);
// contentPane
contentPane.setLayout(null);
addComponent(contentPane, jTabbedPane1, 11,10,990,690);
// paineltabela
paineltabela.setLayout(null);
// painelgrafo
painelgrafo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
// Poseidon
this.setTitle("UMa Poseidon");
this.setLocation(new Point(2, 1));
this.setSize(new Dimension(558, 441));
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
this.setExtendedState(MAXIMIZED_BOTH);
/** Add Component Without a Layout Manager (Absolute Positioning) */
private void addComponent(Container container,Component c,int x,int y,int width,int height)
c.setBounds(x,y,width,height);
container.add(c);
// TODO: Add any appropriate code in the following Event Handling Methods
private void jTabbedPane1_stateChanged(ChangeEvent e)
System.out.println("\njTabbedPane1_stateChanged(ChangeEvent e) called.");
// TODO: Add any handling code here
// TODO: Add any method code to meet your needs in the following area
private class TratBarra implements ActionListener{
public void actionPerformed(ActionEvent e){
if(e.getSource() == sair){
int op = JOptionPane.showConfirmDialog(null, "Deseja mesmo fechar o aplicativo?","Sair", JOptionPane.YES_NO_OPTION);
if(op == JOptionPane.YES_OPTION){
System.exit(0);
if(e.getSource() == miadvariavel){
final JFrame w = new JFrame();
new AdVariavel(w);
if(e.getSource() == miadtarefa){
final JFrame w = new JFrame();
new AdTarefa(w);
//============================= Testing ================================//
//= =//
//= The following main method is just for testing this class you built.=//
//= After testing,you may simply delete it. =//
//======================================================================//
public static void main(String[] args)
Spash sp = new Spash(3000);
sp.mostraTela();
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
try
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
catch (Exception ex)
System.out.println("Failed loading L&F: ");
System.out.println(ex);
new Poseidon();
//= End of Testing =
private class AdVariavel extends JDialog
// Variables declaration
private JLabel jLabel1;
private JTextField jTextField1;
private JButton varOK;
private JButton varCancel;
private JPanel contentPane;
private JTextField jTextField2;
private JList listadominio;
private JScrollPane jScrollPane1;
private JButton varAdiciona;
private JButton varRemove;
private JPanel jPanel1;
private DefaultListModel modelo1;
// End of variables declaration
public AdVariavel(Frame w)
super(w);
initializeComponent();
// TODO: Add any constructor code after initializeComponent call
this.setVisible(true);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always regenerated
* by the Windows Form Designer. Otherwise, retrieving design might not work properly.
* Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
* to retrieve your design properly in future, before revising this method.
private void initializeComponent()
modelo1 = new DefaultListModel();
jLabel1 = new JLabel();
jTextField1 = new JTextField();
varOK = new JButton();
varCancel = new JButton();
contentPane = (JPanel)this.getContentPane();
jTextField2 = new JTextField();
listadominio = new JList(modelo1);
jScrollPane1 = new JScrollPane();
varAdiciona = new JButton();
varRemove = new JButton();
jPanel1 = new JPanel();
// jLabel1
jLabel1.setText("Nome da vari�vel:");
// jTextField1
jTextField1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
jTextField1_actionPerformed(e);
// varOK
varOK.setText("OK");
varOK.setMnemonic(KeyEvent.VK_O);
varOK.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
varOK_actionPerformed(e);
// varCancel
varCancel.setText("Cancelar");
varCancel.setMnemonic(KeyEvent.VK_C);
varCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
varCancel_actionPerformed(e);
// contentPane
contentPane.setLayout(null);
addComponent(contentPane, jLabel1, 12,12,105,18);
addComponent(contentPane, jTextField1, 118,10,137,22);
addComponent(contentPane, varOK, 170,227,83,28);
addComponent(contentPane, varCancel, 257,227,85,28);
addComponent(contentPane, jPanel1, 12,42,332,180);
// jTextField2
jTextField2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
jTextField2_actionPerformed(e);
// listadominio
listadominio.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e)
listadominio_valueChanged(e);
// jScrollPane1
jScrollPane1.setViewportView(listadominio);
// varAdiciona
varAdiciona.setText("Adicionar");
varAdiciona.setMnemonic(KeyEvent.VK_A);
varAdiciona.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
varAdiciona_actionPerformed(e);
// varRemove
varRemove.setText("Remover");
varRemove.setMnemonic(KeyEvent.VK_R);
varRemove.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
varRemove_actionPerformed(e);
// jPanel1
jPanel1.setLayout(null);
jPanel1.setBorder(new TitledBorder("Dominio:"));
addComponent(jPanel1, jTextField2, 17,22,130,22);
addComponent(jPanel1, jScrollPane1, 165,21,154,144);
addComponent(jPanel1, varAdiciona, 56,50,89,28);
addComponent(jPanel1, varRemove, 57,84,88,28);
// AdTarefas
this.setTitle("Adicionar Variavel");
this.setLocation(new Point(1, 0));
this.setSize(new Dimension(367, 296));
this.setLocationRelativeTo(null);
this.setResizable(false);
/** Add Component Without a Layout Manager (Absolute Positioning) */
private void addComponent(Container container,Component c,int x,int y,int width,int height)
c.setBounds(x,y,width,height);
container.add(c);
// TODO: Add any appropriate code in the following Event Handling Methods
private void jTextField1_actionPerformed(ActionEvent e)
System.out.println("\njTextField1_actionPerformed(ActionEvent e) called.");
// TODO: Add any handling code here
private void varOK_actionPerformed(ActionEvent e)
System.out.println("\nvarOK_actionPerformed(ActionEvent e) called.");
if (jTextField1 == null){
return;
if (jTextField1.getText().length()<1){
JOptionPane.showMessageDialog(null,"N�o introduziu nenhuma variavel","AVISO", 1 );
jTextField1.requestFocus();
return;
else {
if (modelo1.getSize() == 0){
JOptionPane.showMessageDialog(null,"N�o introduziu nenhum dominio","AVISO", 1 );
return;
else{
painelvariavel.add(scrollvariavel);
index = 0;
variavel = jTextField1.getText();
contastring = variavel.length();
System.out.println(contastring);
DefaultTableModel dtm = (DefaultTableModel)tabelavariavel.getModel();
tabelavariavel.getTableHeader().setBackground(Color.yellow);
dtm.addColumn(variavel, new Object[]{});
al = modelo1.getSize();
totallinhas = al;
for(int i = 0;i < modelo1.getSize();i++){
listadominio.setSelectedIndex(index) ;
Object dominio = listadominio.getSelectedValue();
dtm.addRow(new Object[]{dominio});
index ++;
tabelasvar[cont] = tabelavariavel;
cont++;
System.out.println(cont);
for(int i=0;i<cont;i++){
tabelateste = tabelasvar;
linhas = tabelateste.getRowCount();
if (linhas >= tamanholinhas){
tamanholinhas = linhas;
for (int i=0;i<cont;i++){
tabelateste = tabelasvar[i];
System.out.println(linhas);
linhas = tabelateste.getRowCount();
tabelateste.setRowHeight((tamanholinhas/linhas)*20);
tabelasvar[i] = tabelateste;
System.out.println(tabelateste);
tabelavariavel = new JTable();
scrollvariavel = new JScrollPane();
painelvariavel.add(tabelavariavel);
tabelavariavel.setBackground(Color.cyan);
tabelavariavel.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
scrollvariavel.setViewportView(tabelavariavel);
painelvariavel.setVisible(true);
tabelavariavel.getTableHeader().setReorderingAllowed(false);
this.setVisible(false);
miadtarefa.setEnabled(true);
miadvariavel.setEnabled(true);
DefaultTableModel dtm = (DefaultTableModel)tabelatarefa.getModel();
tabelatarefa.getTableHeader().setBackground(Color.yellow);
controlalinhas = tamanholinhas - linhastarefa;
for(int i = 0;i < controlalinhas;i++){
dtm.addRow(new Object[]{});
linhastarefa++;
tabelatarefa.setRowHeight((tamanholinhas/linhas)*20);
// TODO: Add any handling code here
private void varCancel_actionPerformed(ActionEvent e)
System.out.println("\nvarCancel_actionPerformed(ActionEvent e) called.");
this.setVisible(false);
private void jTextField2_actionPerformed(ActionEvent e)
System.out.println("\njTextField2_actionPerformed(ActionEvent e) called.");
// TODO: Add any handling code here
private void listadominio_valueChanged(ListSelectionEvent e)
System.out.println("\nlistadominio_valueChanged(ListSelectionEvent e) called.");
if(!e.getValueIsAdjusting())
Object o = listadominio.getSelectedValue();
System.out.println(">>" + ((o==null)? "null" : o.toString()) + " is selected.");
// TODO: Add any handling code here for the particular object being selected
private void varAdiciona_actionPerformed(ActionEvent e)
System.out.println("\nvarAdiciona_actionPerformed(ActionEvent e) called.");
if(jTextField2.getText().length()>=1){
modelo1.addElement(jTextField2.getText());
jTextField2.setText("");
jTextField2.requestFocus();
private void varRemove_actionPerformed(ActionEvent e)
System.out.println("\nvarRemove_actionPerformed(ActionEvent e) called.");
int index = listadominio.getSelectedIndex();
modelo1.remove(index);
// TODO: Add any method code to meet your needs in the following area
private class AdTarefa extends JDialog
// Variables declaration
private JLabel jLabel1;
private JTextField jTextField1;
private JButton tarOK;
private JButton tarCancel;
private JPanel contentPane;
private JPanel jPanel1;
// End of variables declaration
public AdTarefa(Frame w)
super(w);
initializeComponent();
// TODO: Add any constructor code after initializeComponent call
this.setVisible(true);
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always regenerated
* by the Windows Form Designer. Otherwise, retrieving design might not work properly.
* Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
* to retrieve your design properly in future, before revising this method.
private void initializeComponent()
jLabel1 = new JLabel();
jTextField1 = new JTextField();
tarOK = new JButton();
tarCancel = new JButton();
contentPane = (JPanel)this.getContentPane();
// jLabel1
jLabel1.setText("Nome da tarefa:");
// jTextField1
jTextField1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
jTextField1_actionPerformed(e);
// tarOK
tarOK.setText("OK");
tarOK.setMnemonic(KeyEvent.VK_O);
tarOK.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
tarOK_actionPerformed(e);
// tarCancel
tarCancel.setText("Cancelar");
tarCancel.setMnemonic(KeyEvent.VK_C);
tarCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
tarCancel_actionPerformed(e);
// contentPane
contentPane.setLayout(null);
addComponent(contentPane, jLabel1, 12,12,105,18);
addComponent(contentPane, jTextField1, 118,10,120,22);
addComponent(contentPane, tarOK, 10,50,83,28);
addComponent(contentPane, tarCancel, 153,50,85,28);
// AdTarefas
this.setTitle("Adicionar Tarefa");
this.setLocation(new Point(1, 0));
this.setSize(new Dimension(250, 120));
this.setLocationRelativeTo(null);
this.setResizable(false);
/** Add Component Without a Layout Manager (Absolute Positioning) */
private void addComponent(Container container,Component c,int x,int y,int width,int height)
c.setBounds(x,y,width,height);
container.add(c);
// TODO: Add any appropriate code in the following Event Handling Methods
private void jTextField1_actionPerformed(ActionEvent e)
System.out.println("\njTextField1_actionPerformed(ActionEvent e) called.");
// TODO: Add any handling code here
private void tarOK_actionPerformed(ActionEvent e)
System.out.println("\ntarOK_actionPerformed(ActionEvent e) called.");
if (jTextField1 == null){
return;
if (jTextField1.getText().length()<1){
JOptionPane.showMessageDialog(null,"N�o introduziu nenhuma tarefa","AVISO", 1 );
jTextField1.requestFocus();
return;
else{
String variavel = jTextField1.getText();
DefaultTableModel dtm = (DefaultTableModel)tabelatarefa.getModel();
dtm.addColumn(variavel,new Object[]{});
controlalinhas = tamanholinhas - linhastarefa;
for(int i = 0;i < controlalinhas;i++){
dtm.addRow(new Object[]{});
linhastarefa++;
for(int i=0; i < tabelatarefa.getColumnCount(); i++){
tabelatarefa.getColumnModel().getColumn(i).setPreferredWidth(100);
tabelatarefa.getColumnModel().getColumn(i).setResizable(false);
tabelatarefa.getTableHeader().setBackground(Color.yellow);
tabelatarefa.setRowHeight((tamanholinhas/linhas)*20);
paineltarefa.setVisible(true);
tabelatarefa.getTableHeader().setReorderingAllowed(true);
this.setVisible(false);
miadtarefa.setEnabled(true);
miadvariavel.setEnabled(true);
// TODO: Add any handling code here
private void tarCancel_actionPerformed(ActionEvent e)
System.out.println("\ntarCancel_actionPerformed(ActionEvent e) called.");
this.setVisible(false);hi, my preoblem in in this part of the code:
private void varOK_actionPerformed(ActionEvent e)
if (jTextField1 == null){
return;
if (jTextField1.getText().length()<1){
JOptionPane.showMessageDialog(null,"N�o introduziu nenhuma variavel","AVISO", 1 );
jTextField1.requestFocus();
return;
else {
if (modelo1.getSize() == 0){
JOptionPane.showMessageDialog(null,"N�o introduziu nenhum dominio","AVISO", 1 );
return;
else{
painelvariavel.add(scrollvariavel);
index = 0;
variavel = jTextField1.getText();
contastring = variavel.length();
System.out.println(contastring);
DefaultTableModel dtm = (DefaultTableModel)tabelavariavel.getModel();
tabelavariavel.getTableHeader().setBackground(Color.yellow);
dtm.addColumn(variavel, new Object[]{});
al = modelo1.getSize();
totallinhas = al;
for(int i = 0;i < modelo1.getSize();i++){
listadominio.setSelectedIndex(index) ;
Object dominio = listadominio.getSelectedValue();
dtm.addRow(new Object[]{dominio});
index ++;
}when the user input the variable "variavel",if this variable is too long i want that ,when the column will be create, the variable appear in multiplelines in the columnheader, in this part are my problem because i don�t know how to do it.
i think i was explain well. -
Receiver determination step in the BPM and multiline container
i have made a file2file scenario where:
there is a BPM,
the BPM has a send step which contains a receive step,
a transformation that mapps the incomin message to two messages(Split-messgae case),
and then a FORK step which sends the two messges to through 2 SEND steps to the intended receiver services.
It didnt work......and i followed a blog-> /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure ............... which suggested to have a
"receiver-determination" step in the BPM before the SEND step.... it says that this
"receiver-determination" step will put the message in a MULTILINE container..
i m confused bout this step ........ can anybody explain.....
please helpHI,
In receiver determination step selctthe multi line container element.in container editor create the one element with type as receiver and select the check box.
A Receiver Determination step returns set of receivers configured for the output abs interfaces in the directory and puts it into receiver which is a multiline container receiver element
Regards
Chilla -
How can I create a pop up message in MULTILINE on WEB GUI?
Hi Experts,
I have gone through several thread to search if I can write pop up message in more than in one line.
for example...
title: continue ?
SDD no12366
customer name: abc ltm
lines: 2 lines records
gr_pers_popup = comp_controller->window_manager->create_popup_2_confirm(
iv_title = 'CAUTION - Continue Import ?'
iv_text = lv_text "'SDD-1234676; Cust - ABSOLUTE GLASS WORKS; Lines - 2'
iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesno
gr_pers_popup->open( ).
gr_pers_popup->set_on_close_event( iv_event_name = 'Confirm' iv_view = me ).
Please advise, if any work around available to display multiple line on pop_up_confirm text on WEB UI .
Thanks in advance.Multiline messages cannot be shown on standard Pop Up. In case you need multiline messages then create a new view, use it as a pop up and then you can show text messages as per the business requirement.
The blog mentioned above (http://wiki.sdn.sap.com/wiki/display/CRM/CallingCustomcomponentaspopupfromastandardcomponentinCRMWEBUI-Part+2) will definately help you
Rg,
Harshit -
Email formatting - multiline symbol not showing
Hi Workflowers
I am using method <i>sendtaskdescription</i> to send an email. The body of the mail is the task description as normal. I have embedded a multiline element as an expression in the task description using the option "All lines with line break". However, only the first line will show in the email. Each line of the multiline element is simply a text string.
I have tried all kinds of formatting options in the task description, but nothing seems to help. Anyone with any suggestions?Out of all the meaningless and unexplained suggestions here in this forum....
Would you care to explain why refreshing the organizational buffers should influence the multiline text element inclusion in a work item description? Or were you just taking a shot in the dark, hoping to get some points awarded either out of pity or because Tony didn't know better?
Now, before some of you say I shouldn't be so harsh, I care to disagree. If this is the quality of advice, then what is the point of the forum? The goal of this forum surely can not be to <u>lower</u> our average intelligence, can it?
If someone, like Abishek in this case, is taking a shot in the dark - they he/she should at least have the decency and integrity to qualify their advice by stating that: "I'm taking a shot in the dark", or "I don't really know anything about this, but here are some general tricks to try when things fail". -
[Forum FAQ] How to remove div characters from multiline textbox field in SharePoint 2013
Scenario:
Need to avoid the div tags and get data alone from multiline textbox field using JavaScript Client Object Model in SharePoint 2013.
Solution:
We can use a regular expression to achieve it.
The steps in detail as follows:
1. Insert a Script Editor Web Part into the page.
2. This is the complete code, add it into the Script Editor Web Part and save.
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "sp.js");
function retrieveListItems() {
// Create an instance of the current context to return context information
var clientContext = new SP.ClientContext.get_current();
//Returns the list with the specified title from the collection
var oList = clientContext.get_web().get_lists().getByTitle('CustomListName');
//use CAML to query the top 10 items
var camlQuery = new SP.CamlQuery();
//Sets value that specifies the XML schema that defines the list view
camlQuery.set_viewXml('<View><RowLimit>10</RowLimit></View>');
//Returns a collection of items from the list based on the specified query
this.collListItem = oList.getItems(camlQuery);
clientContext.load(this.collListItem, 'Include(Title,MultipleText)');
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
function onQuerySucceeded() {
//Returns an enumerator to iterate through the collection
var listItemEnumerator = this.collListItem.getEnumerator();
//Remove div tag use a regular expression
var reg1 = new RegExp("<div class=\"ExternalClass[0-9A-F]+\">[^<]*", "");
var reg2 = new RegExp("</div>$", "");
//Advances the enumerator to the next element of the collection
while (listItemEnumerator.moveNext()) {
//Gets the current element in the collection
var oListItem = listItemEnumerator.get_current();
alert(oListItem.get_item('MultipleText').replace(reg1, "").replace(reg2, ""));
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
</script>
Result:<o:p></o:p>
References:
http://www.w3schools.com/jsref/jsref_obj_regexp.asp
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Nice article :)
If this helped you resolve your issue, please mark it Answered -
Problem with addRow and MultiLine Cell renderer
Hi ,
Ive a problem with no solution to me .......
Ive seen in the forum and Ivent found an answer.......
The problem is this:
Ive a JTable with a custom model and I use a custom multiline cell renderer.
(becuse in the real application "way" hasnt static lenght)
When I add the first row all seem to be ok.....
when I try to add more row I obtain :
java.lang.ArrayIndexOutOfBoundsException: 1
at javax.swing.SizeSequence.insertEntries(SizeSequence.java:332)
at javax.swing.JTable.tableRowsInserted(JTable.java:2926)
at javax.swing.JTable.tableChanged(JTable.java:2858)
at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableMo
del.java:280)
at javax.swing.table.AbstractTableModel.fireTableRowsInserted(AbstractTa
bleModel.java:215)
at TableDemo$MyTableModel.addRow(TableDemo.java:103)
at TableDemo$2.actionPerformed(TableDemo.java:256)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
64)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5134)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
This seems to be caused by
table.setRowHeight(row,(getPreferredSize().height+2)); (line 164 of my example code)
About the model I think its ok.....but who knows :-(......
Please HELP me in anyway!!!
Example code :
import javax.swing.*;
import javax.swing.table.*;
import java.text.*;
import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class TableDemo extends JFrame {
private boolean DEBUG = true;
MyTableModel myModel = new MyTableModel();
MyTable table = new MyTable(myModel);
int i=0;
public TableDemo() {
super("TableDemo");
JButton bottone = new JButton("Aggiungi 1 elemento");
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
//table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this window.
getContentPane().add(bottone,BorderLayout.NORTH);
getContentPane().add(scrollPane, BorderLayout.CENTER);
bottone.addActionListener(Add_Action);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
class MyTable extends JTable {
MultiLineCellRenderer multiRenderer=new MultiLineCellRenderer();
MyTable(TableModel tm)
super(tm);
public TableCellRenderer getCellRenderer(int row,int col) {
if (col==1) return multiRenderer;
else return super.getCellRenderer(row,col);
class MyTableModel extends AbstractTableModel {
Vector data=new Vector();
final String[] columnNames = {"Name",
"Way",
"DeadLine (ms)"
public int getColumnCount() { return 3; }
public int getRowCount() { return data.size(); }
public Object getValueAt(int row, int col) {
Vector rowdata=(Vector)data.get(row);
return rowdata.get(col); }
public String getColumnName(int col) {
return columnNames[col];
public void setValueAt (Object value, int row,int col)
//setto i dati della modifica
Vector actrow=(Vector)data.get(row);
actrow.set(col,value);
this.fireTableCellUpdated(row,col);
public Class getColumnClass(int c)
return this.getValueAt(0,c).getClass();
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
if (col == 1)
return false;
else
return true;
public void addRow (String name,ArrayList path,Double dead) {
Vector row =new Vector();
row.add(name);
row.add(path);
row.add(dead);
row.add(name); //!!!Mi tengo questo dato da utilizzare come key per andare a
//prendere il path nella lista dei paths di Project
//(needed as key to retrive data if name in col. 1 is changed)
data.add(row);
//Inspector.inspect(this);
System.out.println ("Before firing Adding row...."+this.getRowCount());
this.fireTableRowsInserted(this.getRowCount(),this.getRowCount());
public void delRow (String namekey)
for (int i=0;i<this.getRowCount();i++)
if (namekey.equals(this.getValueAt(i,3)))
data.remove(i);
this.fireTableRowsDeleted(i,i);
//per uscire dal ciclo
i=this.getRowCount();
public void delAllRows()
int i;
int bound =this.getRowCount();
for (i=0;i<bound;i++)
{data.remove(0);
System.out.println ("Deleting .."+data);
this.fireTableRowsDeleted(0,i);
class MultiLineCellRenderer extends JTextArea implements TableCellRenderer {
private Hashtable rowHeights=new Hashtable();
public MultiLineCellRenderer() {
setEditable(false);
setLineWrap(true);
setWrapStyleWord(true);
//this.setBorder(new Border(
public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected, boolean hasFocus, int row, int column) {
//System.out.println ("Renderer called"+value.getClass());
if (value instanceof ArrayList) {
String way=new String (value.toString());
setText(way);
TableColumn thiscol=table.getColumn("Way");
//System.out.println ("thiscol :"+thiscol.getPreferredWidth());
//setto il size della JTextarea sulle dimensioni della colonna
//per quanto riguarda il widht e su quelle ottenute da screen per l'height
this.setSize(thiscol.getPreferredWidth(),this.getPreferredSize().height);
// set the table's row height, if necessary
//System.out.println ("Valore getPreferred.height"+getPreferredSize().height);
if (table.getRowHeight(row)!=(this.getPreferredSize().height+2))
{System.out.println ("Setting Row :"+row);
System.out.println ("Dimension"+(getPreferredSize().height+2));
System.out.println ("There are "+table.getRowCount()+"rows in the table ");
if (row<table.getRowCount())
table.setRowHeight(row,(getPreferredSize().height+2));
else
setText("");
return this;
/**Custom JTextField Subclass che permette all'utente di immettere solo numeri
class WholeNumberField extends JTextField {
private Toolkit toolkit;
private NumberFormat integerFormatter;
public WholeNumberField(int value, int columns) {
super(columns);
toolkit = Toolkit.getDefaultToolkit();
integerFormatter = NumberFormat.getNumberInstance(Locale.US);
integerFormatter.setParseIntegerOnly(true);
setValue(value);
public int getValue() {
int retVal = 0;
try {
retVal = integerFormatter.parse(getText()).intValue();
} catch (ParseException e) {
// This should never happen because insertString allows
// only properly formatted data to get in the field.
toolkit.beep();
return retVal;
public void setValue(int value) {
setText(integerFormatter.format(value));
protected Document createDefaultModel() {
return new WholeNumberDocument();
protected class WholeNumberDocument extends PlainDocument {
public void insertString(int offs,
String str,
AttributeSet a)
throws BadLocationException {
char[] source = str.toCharArray();
char[] result = new char[source.length];
int j = 0;
for (int i = 0; i < result.length; i++) {
if (Character.isDigit(source))
result[j++] = source[i];
else {
toolkit.beep();
System.err.println("insertString: " + source[i]);
super.insertString(offs, new String(result, 0, j), a);
ActionListener Add_Action = new ActionListener() {
public void actionPerformed (ActionEvent e)
System.out.println ("Adding");
ArrayList way =new ArrayList();
way.add(new String("Uno"));
way.add(new String("Due"));
way.add(new String("Tre"));
way.add(new String("Quattro"));
myModel.addRow(new String("Nome"+i++),way,new Double(0));
public static void main(String[] args) {
TableDemo frame = new TableDemo();
frame.pack();
frame.setVisible(true);In the addRow method, change the line
this.fireTableRowsInserted(this.getRowCount(),this.getRowCount()); to
this.fireTableRowsInserted(data.size() - 1, data.size() - 1);Sai Pullabhotla -
Hello.
Is it possible to have a multiline field in an ALV control (cl_gui_alv_grid or cl_salv_table). I already searched the documentation but I could not find anything about multiline fields in a single row.
Thanks in advance.No, you can not wrap text within the cell.
Regards,
RIch Heilman -
How can I display append changes history of a multiline textbox in custom form?
I want to display changes history of multiline textbox in custom aspx form as normally display in standard dispform.aspx and editform.aspx page.
How can I do this?Hello
It seems you want to get the versions of multiline textbox, see following article, may help you
http://www.mtelligent.com/journal/2007/10/17/the-insanity-of-getting-versions-of-a-multilinetext-box-set-.html
Keep us updating.
Ashish Kanoongo, MCP, MCSD, MCTS -
I am new in acroforms.
I have a form with 5 pages, in the first page the user fill personal information, the fields are (names, addres, birtdate, ocupation,etc ) all are texboxes, I need to get the same value of every textboxes of the first page into the 2d and 3, 4 and 5 pages, I have created another textboxes in the 2, 3 .. pages with the same names in order to duplicate the value of each one, but if I make some of them readonly, every textboxes in every page are readonly...
For that reaseon, I tried changin the name of the texboxes of the 2, 3, 4 and 5 pages to names1, names2, names3, names4, and so on for the other fields, I have written some scripts, but no lucky, because I used this line in every new textbox, as the following (for the textbox names1)
this.getField("names").Value
Without results, the textboxes apears in blank
And also, in the last page I need to join some texboxes values in only one multiline textbox
Please any advice will be welcome..
Muchas gracias
RafsysFor the information in the second text box to be the same as the first text box (i.e. - on later pages), simply give the fields the same name. The second on could be set to readonly and you could even remove the borders and such so it looked like it was just part of the page. This last trick would get around the need to combine the fields for the display as you mention. Combining the fields would have to be done with JavaScript.
-
I'm trying the trial version of formscentral and have made a form. In this form I used the text (multiline) option. I saved the form as a pdf and filled it out to test it. When I go to print the form the only text that appears is what's visible on the screen. How do I print the form so that all of the information is depicted?
This is something we are working on fixing but in the mean time what you can do is one of two things :
1) make the multiline fields taller so that it would fit all the text in the responses.
You can do that by going to the Desing Tab and dragging the bottom right corner of a multiline text fields to make them bigger.
2) print the Detail View instead.
From the View Responses Tab go to View > Detail View.
Select the response you want to print
Press on the printer icon at the bottom of the Detail View.
This will print the data in a name/value pair format.
Gen -
Error: Expression must not return a multiline value
Hi all,
I am doing a file to file scenario. My input file has more than one record. I have to validate for each of these records and send back the erroneous records in a file to the source folder.
I am using BPM for this. In my BPM, i have some multiline container elements. When i try to activate my BPM, i am getting an error saying: <b>Expression must not return a multiline value.</b>
Can anybody tell me why this error is coming? Also i want to know what type of mapping i have to do to split my source file.
Regards,
Divija."Can anybody tell me why this error is coming? Also i want to know what type of mapping i have to do to split my source file."
Go through the following blogs which give step-bystep approach for split mapping using BPM:-
1. /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
2. /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
Also, you might want to look at this, where a BPM is not required..i think you can avoid a BPM altogether if you have very little validation..
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
Regards,
Sushumna -
Integrate html tags in a string and display it in a multiline text area
Hi ABAPers!!
First of all let me tell you that I'm working in ACCENTURE Casablanca(Morocco) and this is my first Job in my career.
I'm working on an ALV OO, the program consists on creating an ALV using OO, In my selection screen there's a parameter of type ddobjname I provide the name of table and it returns the table's fields in another dynpro (screen0100), To do this I used the FM: 'DDIF_FIELDINFO_GET' then I append the internal table returned in another one to add the field CB (CheckBox), and I add a button in the toolbar, the function of this button is to generate a MySQL script To create the table provided by the user in my parameter (Screen 1000), but the fields of this table(MySQL) in the generated script are only the selected ones by cheking the checkbox in the ALV.
I store my script in a string.
My problem is that I want to show my script in a text area, but I don't know how to create a multiline text area!!
And I want to use HTML tags in my string.
I don't want to my string like this :
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI ( CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY , FLTIME INT ( 10 ) , DEPTIME DATETIME ( 6 ) , DISTANCE DOUBLE ( 9 ) , FLTYPE VARCHAR ( 1 ));
But I want it to be shown like this:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI (
CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY ,
FLTIME INT ( 10 ) ,
DEPTIME DATETIME ( 6 ) ,
DISTANCE DOUBLE ( 9 ) ,
FLTYPE VARCHAR ( 1 ));
Thanks in advance
Regards
SMAALI Achraf
Edited by: SMAALI90 on May 11, 2011 7:12 PMHi again!!
You know what!! let's forget the HTML and focuse on what I want to show.
As I told you, I've a string which contains my script.
I don't want that it will be shown as a simple line like this :
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI ( CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY , FLTIME INT ( 10 ) , DEPTIME DATETIME ( 6 ) , DISTANCE DOUBLE ( 9 ) , FLTYPE VARCHAR ( 1 ));
But I want it to be shown as follows:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] SPFLI (
CONNID CHAR ( 4 ) NOT NULL PRIMARY KEY ,
FLTIME INT ( 10 ) ,
DEPTIME DATETIME ( 6 ) ,
DISTANCE DOUBLE ( 9 ) ,
FLTYPE VARCHAR ( 1 ));
and finally I want to show it in a multiline text area.
Plz what shud I do?!!! If possible I need a piece of code.
PS : I create a HTML Viewer using this code :
DATA : go_conteneur TYPE REF TO cl_gui_docking_container,
go_controle_html TYPE REF TO cl_gui_html_viewer.
CREATE OBJECT go_conteneur
EXPORTING
repid = sy-repid
dynnr = '0100'
side = go_conteneur->dock_at_bottom
extension = 1000
name = 'CONTENEUR'
EXCEPTIONS
OTHERS = 1.
CREATE OBJECT go_controle_html
EXPORTING
parent = go_conteneur
EXCEPTIONS
OTHERS = 1.
But when it's shown my ALV disappears!!! -
Trouble with multiline text box reading from xml file
Hi,
I have a text area, set to multiline. For some reason, when my text imported from xml shows up in the box, it starts several lines down into the box. So for example, my Text box is positioned with the top at the midpoint of my stage, but the text starts about 3/4 down the page, about half way down the text box. Can someone please tell me why this is happening and what I can do to fix it?
I noticed that when I put my cursor in the box and move it up and down, the rest of the text 'scrolls' into the frame, but otherwise it's cut off. please help!
Thanks,
StanCould you show your XML?
-
How to set the default text in an input box or a label to be a predefine, multiline text
how to set the default text in an input box or a label to be a predefine, multiline text. In other words how to break the line in the code of a text box.
thank youThere are a couple of ways of doing this:
If you're editing on the canvas, press Shift + Enter.
If you're working in Express View (see lower right hand corner of Project Siena), you'll need to copy a hard return from another app such as Notepad.
I believe a better implementation of hard returns are in the list of requested functionality that you can find here:
https://social.technet.microsoft.com/Forums/en-US/2e1f9446-56b2-419a-9c17-7037d2cd6146/from-the-community-overview-of-requested-additional-functionality?forum=projectsiena
Thor
Maybe you are looking for
-
Migrate from Crystal Report XI R2 to Business Objects XI R2
Hello friends, As per end of licence life cycle for Crystal report, we need to migrate our 30 crystal reports to BO xi r2. First thing i need to ask is that ...is this possible to migrate from Crystal report XI R2 to BO xi R2 ? If yes than where i ca
-
Hi All, This is not a burning problem, but have folks tried out the NXT toolkit with Vista? I've installed Vista Business Edition under our MSDNAA license on a development machine to start slogging through compatability issues with our current suite
-
Source file md5sum changing often
I have created a package for port_audio_v18. This is not the last version of portaudio (which is v19 currently), because only the v18 is supported by crrcsim (an RC simulator). But V18 is still evolving due to bug fixes. It means that the downloada
-
I'm having problems with FaceTime. anyone know why i can't login?
it says please check network connection. what could be the matter?
-
"Server Not Found" pops-up when web-serfing, almost constantly, why? .
This problem started about one week ago, when trying to get common web sites.