|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
formatting Label widgetsHi Cyril,
I'm trying to create a Label in which the text is preformatted. Here's the code: var myFrame = new rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); var extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); exL.setTextWidth(extInfoT); As you can see, the horizontal scrollbar shouldn't be necessary. But the width is computed using the "nowrap" style. Is there a way to get the Label's width calculated using it's real style (i.e. "pre" in this code)? The problem is that the default (and only supported) style for labels seems to be "nowrap". This implies strange behaviors when you try using other formatting styles ("pre", "wrap" , ...). Maybe it could be useful to be able to precise a given style on the label's creation (if one wants to use another style than "nowrap"). What do you think about it? Thanks again for your help. Fred |
|
|
Re: formatting Label widgetsHello Fred,
I made a correction. You can update the rialto.js file But you have to use the setStyle method of the label exL.setStyle({whiteSpace : "pre"}); Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > I'm trying to create a Label in which the text is preformatted. Here's > the code: > var myFrame = new > rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); > var > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > exL.setTextWidth(extInfoT); > > As you can see, the horizontal scrollbar shouldn't be necessary. But > the width is computed using the "nowrap" style. Is there a way to get > the Label's width calculated using it's real style (i.e. "pre" in this > code)? > The problem is that the default (and only supported) style for labels > seems to be "nowrap". This implies strange behaviors when you try > using other formatting styles ("pre", "wrap" , ...). > Maybe it could be useful to be able to precise a given style on the > label's creation (if one wants to use another style than "nowrap"). > > What do you think about it? > > Thanks again for your help. > > Fred > |
|
|
Re: formatting Label widgetsHi Cyril,
I still have some problems with the Label.setStyle function. Here's my new code: var myFrame = new rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); var extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; var exL=new rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); exL.setStyle({whiteSpace : "pre"}); On Firefox, the text is correctly formatted, but the horizontal scrollbar remains. On IE, the text isn't even formatted. Thanks, Fred --- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote: > > Hello Fred, > > I made a correction. You can update the rialto.js file > > But you have to use the setStyle method of the label > > exL.setStyle({whiteSpace : "pre"}); > > Cyril > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Hi Cyril, > > > > I'm trying to create a Label in which the text is preformatted. Here's > > the code: > > var myFrame = new > > > > > var > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > exL.setTextWidth(extInfoT); > > > > As you can see, the horizontal scrollbar shouldn't be necessary. But > > the width is computed using the "nowrap" style. Is there a way to get > > the Label's width calculated using it's real style (i.e. "pre" in this > > code)? > > The problem is that the default (and only supported) style for labels > > seems to be "nowrap". This implies strange behaviors when you try > > using other formatting styles ("pre", "wrap" , ...). > > Maybe it could be useful to be able to precise a given style on the > > label's creation (if one wants to use another style than "nowrap"). > > > > What do you think about it? > > > > Thanks again for your help. > > > > Fred > > > |
|
|
Re: formatting Label widgetsI fixed the scroll bar for firefox. It is still a refresh problem.
But for IE i don't understand, the whiteSpace rule is not apply. I keep looking. Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > I still have some problems with the Label.setStyle function. > Here's my new code: > var myFrame = new > rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); > var > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > var exL=new rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > exL.setStyle({whiteSpace : "pre"}); > > On Firefox, the text is correctly formatted, but the horizontal > scrollbar remains. > On IE, the text isn't even formatted. > > Thanks, > > Fred > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > Hello Fred, > > > > I made a correction. You can update the rialto.js file > > > > But you have to use the setStyle method of the label > > > > exL.setStyle({whiteSpace : "pre"}); > > > > Cyril > > > > --- In rialto-dev@..., "frederic_viollet" > > <frederic.viollet@> wrote: > > > > > > Hi Cyril, > > > > > > I'm trying to create a Label in which the text is preformatted. > > > the code: > > > var myFrame = new > > > > > > rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); > > > var > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > exL.setTextWidth(extInfoT); > > > > > > As you can see, the horizontal scrollbar shouldn't be necessary. But > > > the width is computed using the "nowrap" style. Is there a way to get > > > the Label's width calculated using it's real style (i.e. "pre" in this > > > code)? > > > The problem is that the default (and only supported) style for labels > > > seems to be "nowrap". This implies strange behaviors when you try > > > using other formatting styles ("pre", "wrap" , ...). > > > Maybe it could be useful to be able to precise a given style on the > > > label's creation (if one wants to use another style than "nowrap"). > > > > > > What do you think about it? > > > > > > Thanks again for your help. > > > > > > Fred > > > > > > |
|
|
Re: formatting Label widgetsOk, thanks.
It works indeed on Firefox now. --- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote: > > I fixed the scroll bar for firefox. It is still a refresh problem. > But for IE i don't understand, the whiteSpace rule is not apply. I > keep looking. > > Cyril > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Hi Cyril, > > > > I still have some problems with the Label.setStyle function. > > Here's my new code: > > var myFrame = new > > > > > var > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > var exL=new rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > exL.setStyle({whiteSpace : "pre"}); > > > > On Firefox, the text is correctly formatted, but the horizontal > > scrollbar remains. > > On IE, the text isn't even formatted. > > > > Thanks, > > > > Fred > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > Hello Fred, > > > > > > I made a correction. You can update the rialto.js file > > > > > > But you have to use the setStyle method of the label > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > Cyril > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > <frederic.viollet@> wrote: > > > > > > > > Hi Cyril, > > > > > > > > I'm trying to create a Label in which the text is preformatted. > Here's > > > > the code: > > > > var myFrame = new > > > > > > > > > > > > > > var > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > exL.setTextWidth(extInfoT); > > > > > > > > As you can see, the horizontal scrollbar shouldn't be necessary. But > > > > the width is computed using the "nowrap" style. Is there a way > to get > > > > the Label's width calculated using it's real style (i.e. "pre" > in this > > > > code)? > > > > The problem is that the default (and only supported) style for > labels > > > > seems to be "nowrap". This implies strange behaviors when you try > > > > using other formatting styles ("pre", "wrap" , ...). > > > > Maybe it could be useful to be able to precise a given style > > > > label's creation (if one wants to use another style than "nowrap"). > > > > > > > > What do you think about it? > > > > > > > > Thanks again for your help. > > > > > > > > Fred > > > > > > > > > > |
|
|
Re: formatting Label widgetsHi Cyril,
Were you able to find something? It seems that if '\n's are replaced with '<br>'s, it works. Could it be a doctype problem? Something not working in quirk mode maybe? Thanks... Fred --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Ok, thanks. > It works indeed on Firefox now. > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > I fixed the scroll bar for firefox. It is still a refresh problem. > > But for IE i don't understand, the whiteSpace rule is not apply. I > > keep looking. > > > > Cyril > > > > --- In rialto-dev@..., "frederic_viollet" > > <frederic.viollet@> wrote: > > > > > > Hi Cyril, > > > > > > I still have some problems with the Label.setStyle function. > > > Here's my new code: > > > var myFrame = new > > > > > > > > > var > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > var exL=new > rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > On Firefox, the text is correctly formatted, but the horizontal > > > scrollbar remains. > > > On IE, the text isn't even formatted. > > > > > > Thanks, > > > > > > Fred > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > > > Hello Fred, > > > > > > > > I made a correction. You can update the rialto.js file > > > > > > > > But you have to use the setStyle method of the label > > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > Cyril > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > <frederic.viollet@> wrote: > > > > > > > > > > Hi Cyril, > > > > > > > > > > I'm trying to create a Label in which the text is preformatted. > > Here's > > > > > the code: > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > var exL=new rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > > exL.setTextWidth(extInfoT); > > > > > > > > > > As you can see, the horizontal scrollbar shouldn't be > necessary. But > > > > > the width is computed using the "nowrap" style. Is there a way > > to get > > > > > the Label's width calculated using it's real style (i.e. "pre" > > in this > > > > > code)? > > > > > The problem is that the default (and only supported) style for > > labels > > > > > seems to be "nowrap". This implies strange behaviors when > > > > > using other formatting styles ("pre", "wrap" , ...). > > > > > Maybe it could be useful to be able to precise a given style > on the > > > > > label's creation (if one wants to use another style than > "nowrap"). > > > > > > > > > > What do you think about it? > > > > > > > > > > Thanks again for your help. > > > > > > > > > > Fred > > > > > > > > > > > > > > > |
|
|
Re: formatting Label widgetsFred,
The whiteSpace pre is not take by IE so i add a little change. I put PRE tag when i get the label width and it seems to feet. But i can't display multi /n Can you test it... Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > Were you able to find something? It seems that if '\n's are replaced > with '<br>'s, it works. Could it be a doctype problem? Something not > working in quirk mode maybe? > > Thanks... > > Fred > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Ok, thanks. > > It works indeed on Firefox now. > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > I fixed the scroll bar for firefox. It is still a refresh problem. > > > But for IE i don't understand, the whiteSpace rule is not apply. I > > > keep looking. > > > > > > Cyril > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > <frederic.viollet@> wrote: > > > > > > > > Hi Cyril, > > > > > > > > I still have some problems with the Label.setStyle function. > > > > Here's my new code: > > > > var myFrame = new > > > > > > > > > > > > > > var > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > var exL=new > > rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > On Firefox, the text is correctly formatted, but the horizontal > > > > scrollbar remains. > > > > On IE, the text isn't even formatted. > > > > > > > > Thanks, > > > > > > > > Fred > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > > > > > Hello Fred, > > > > > > > > > > I made a correction. You can update the rialto.js file > > > > > > > > > > But you have to use the setStyle method of the label > > > > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > Cyril > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > I'm trying to create a Label in which the text is > > > Here's > > > > > > the code: > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); > > > > > > var > > > > > > > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > > var exL=new > rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > > > exL.setTextWidth(extInfoT); > > > > > > > > > > > > As you can see, the horizontal scrollbar shouldn't be > > necessary. But > > > > > > the width is computed using the "nowrap" style. Is there a way > > > to get > > > > > > the Label's width calculated using it's real style (i.e. "pre" > > > in this > > > > > > code)? > > > > > > The problem is that the default (and only supported) style for > > > labels > > > > > > seems to be "nowrap". This implies strange behaviors when > you try > > > > > > using other formatting styles ("pre", "wrap" , ...). > > > > > > Maybe it could be useful to be able to precise a given style > > on the > > > > > > label's creation (if one wants to use another style than > > "nowrap"). > > > > > > > > > > > > What do you think about it? > > > > > > > > > > > > Thanks again for your help. > > > > > > > > > > > > Fred > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: formatting Label widgetsHi Cyril,
I've tested the latest rialto.js file and the problem seems to be fixed in IE. The carriage returns are, now, correctly interpreted. There is still one problem (that I hadn't noticed before, but that seems to always have been there) : the tiptool associated to the label is not well formatted on Firefox. The '\n's are replaced by white spaces. On IE, everything is OK. Thanks. Fred --- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote: > > Fred, > > The whiteSpace pre is not take by IE so i add a little change. I put > PRE tag when i get the label width and it seems to feet. But i can't > display multi /n > > Can you test it... > > Cyril > > > > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Hi Cyril, > > > > Were you able to find something? It seems that if '\n's are replaced > > with '<br>'s, it works. Could it be a doctype problem? Something not > > working in quirk mode maybe? > > > > Thanks... > > > > Fred > > > > --- In rialto-dev@..., "frederic_viollet" > > <frederic.viollet@> wrote: > > > > > > Ok, thanks. > > > It works indeed on Firefox now. > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > > > I fixed the scroll bar for firefox. It is still a refresh > > > > But for IE i don't understand, the whiteSpace rule is not apply. I > > > > keep looking. > > > > > > > > Cyril > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > <frederic.viollet@> wrote: > > > > > > > > > > Hi Cyril, > > > > > > > > > > I still have some problems with the Label.setStyle function. > > > > > Here's my new code: > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > var exL=new > > > rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > On Firefox, the text is correctly formatted, but the horizontal > > > > > scrollbar remains. > > > > > On IE, the text isn't even formatted. > > > > > > > > > > Thanks, > > > > > > > > > > Fred > > > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> > > > > > > > > > > > > Hello Fred, > > > > > > > > > > > > I made a correction. You can update the rialto.js file > > > > > > > > > > > > But you have to use the setStyle method of the label > > > > > > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > > > Cyril > > > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > > > I'm trying to create a Label in which the text is > preformatted. > > > > Here's > > > > > > > the code: > > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > > > var exL=new > > rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > > > > exL.setTextWidth(extInfoT); > > > > > > > > > > > > > > As you can see, the horizontal scrollbar shouldn't be > > > necessary. But > > > > > > > the width is computed using the "nowrap" style. Is there a way > > > > to get > > > > > > > the Label's width calculated using it's real style (i.e. "pre" > > > > in this > > > > > > > code)? > > > > > > > The problem is that the default (and only supported) style for > > > > labels > > > > > > > seems to be "nowrap". This implies strange behaviors when > > you try > > > > > > > using other formatting styles ("pre", "wrap" , ...). > > > > > > > Maybe it could be useful to be able to precise a given style > > > on the > > > > > > > label's creation (if one wants to use another style than > > > "nowrap"). > > > > > > > > > > > > > > What do you think about it? > > > > > > > > > > > > > > Thanks again for your help. > > > > > > > > > > > > > > Fred > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: formatting Label widgetsHi Cyril,
Sorry for raising up this problem again, but I'm still facing some problems with the carriage returns in labels. The following example still doesn't work on IE.... :( Any idea? var myFrame = new rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); var extInfoT="Il n'y a aucun rapport de disponible.\nVeuillez appuyer sur le bouton 'Rafraîchir' pour un générer un."; var exL=new rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); exL.setStyle({whiteSpace : "pre"}); Thanks again for your help. Fred --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > I've tested the latest rialto.js file and the problem seems to be > fixed in IE. The carriage returns are, now, correctly interpreted. > There is still one problem (that I hadn't noticed before, but that > seems to always have been there) : the tiptool associated to the label > is not well formatted on Firefox. The '\n's are replaced by white > spaces. On IE, everything is OK. > > Thanks. > > Fred > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > Fred, > > > > The whiteSpace pre is not take by IE so i add a little change. I put > > PRE tag when i get the label width and it seems to feet. But i can't > > display multi /n > > > > Can you test it... > > > > Cyril > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > <frederic.viollet@> wrote: > > > > > > Hi Cyril, > > > > > > Were you able to find something? It seems that if '\n's are replaced > > > with '<br>'s, it works. Could it be a doctype problem? Something not > > > working in quirk mode maybe? > > > > > > Thanks... > > > > > > Fred > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > <frederic.viollet@> wrote: > > > > > > > > Ok, thanks. > > > > It works indeed on Firefox now. > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > > > > > I fixed the scroll bar for firefox. It is still a refresh > problem. > > > > > But for IE i don't understand, the whiteSpace rule is not > > > > > keep looking. > > > > > > > > > > Cyril > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > I still have some problems with the Label.setStyle function. > > > > > > Here's my new code: > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > > var exL=new > > > > rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > > > On Firefox, the text is correctly formatted, but the horizontal > > > > > > scrollbar remains. > > > > > > On IE, the text isn't even formatted. > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Fred > > > > > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> > wrote: > > > > > > > > > > > > > > Hello Fred, > > > > > > > > > > > > > > I made a correction. You can update the rialto.js file > > > > > > > > > > > > > > But you have to use the setStyle method of the label > > > > > > > > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > > > > > Cyril > > > > > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > > > > > I'm trying to create a Label in which the text is > > preformatted. > > > > > Here's > > > > > > > > the code: > > > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > > > > var exL=new > > > rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > > > > > exL.setTextWidth(extInfoT); > > > > > > > > > > > > > > > > As you can see, the horizontal scrollbar shouldn't be > > > > necessary. But > > > > > > > > the width is computed using the "nowrap" style. Is there > a way > > > > > to get > > > > > > > > the Label's width calculated using it's real style (i.e. > "pre" > > > > > in this > > > > > > > > code)? > > > > > > > > The problem is that the default (and only supported) > style for > > > > > labels > > > > > > > > seems to be "nowrap". This implies strange behaviors when > > > you try > > > > > > > > using other formatting styles ("pre", "wrap" , ...). > > > > > > > > Maybe it could be useful to be able to precise a given > > > > on the > > > > > > > > label's creation (if one wants to use another style than > > > > "nowrap"). > > > > > > > > > > > > > > > > What do you think about it? > > > > > > > > > > > > > > > > Thanks again for your help. > > > > > > > > > > > > > > > > Fred > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
Re: formatting Label widgetsHi fred,
I had a look to your problem and i don't understand. It is as IE doesn't care about \n. I keep looking and trying to give you an tip before my hollidays on thursday. Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > Sorry for raising up this problem again, but I'm still facing some > problems with the carriage returns in labels. > The following example still doesn't work on IE.... :( Any idea? > > var myFrame = new > rialto.widget.Frame({name:'myFrame',top:'105',left:5,width:300,height:150,title:'',open:true,dynamic:false,position:'absolute',draggable:false,parent:document.body}); > var extInfoT="Il n'y a aucun rapport de disponible.\nVeuillez appuyer > sur le bouton 'Rafraîchir' pour un générer un."; > var exL=new rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > exL.setStyle({whiteSpace : "pre"}); > > Thanks again for your help. > > Fred > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Hi Cyril, > > > > I've tested the latest rialto.js file and the problem seems to be > > fixed in IE. The carriage returns are, now, correctly interpreted. > > There is still one problem (that I hadn't noticed before, but that > > seems to always have been there) : the tiptool associated to the label > > is not well formatted on Firefox. The '\n's are replaced by white > > spaces. On IE, everything is OK. > > > > Thanks. > > > > Fred > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > > > Fred, > > > > > > The whiteSpace pre is not take by IE so i add a little change. I put > > > PRE tag when i get the label width and it seems to feet. But i can't > > > display multi /n > > > > > > Can you test it... > > > > > > Cyril > > > > > > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > <frederic.viollet@> wrote: > > > > > > > > Hi Cyril, > > > > > > > > Were you able to find something? It seems that if '\n's are > > > > with '<br>'s, it works. Could it be a doctype problem? Something not > > > > working in quirk mode maybe? > > > > > > > > Thanks... > > > > > > > > Fred > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > <frederic.viollet@> wrote: > > > > > > > > > > Ok, thanks. > > > > > It works indeed on Firefox now. > > > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> > > > > > > > > > > > > I fixed the scroll bar for firefox. It is still a refresh > > problem. > > > > > > But for IE i don't understand, the whiteSpace rule is not > apply. I > > > > > > keep looking. > > > > > > > > > > > > Cyril > > > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > > > I still have some problems with the Label.setStyle function. > > > > > > > Here's my new code: > > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > > > > > > > > > > > > > > extInfoT="blablablablablablablablablablabl\nkdqsgkdvbksbfklsdlksdnlfnlsdf\njkdsvfbjkdvfjsdvcoucoucoucoucouc\n"; > > > > > > > var exL=new > > > > > rialto.widget.Label('exL',15,5,myFrame,extInfoT,"libelle1"); > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > > > > > On Firefox, the text is correctly formatted, but the > horizontal > > > > > > > scrollbar remains. > > > > > > > On IE, the text isn't even formatted. > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > Fred > > > > > > > > > > > > > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> > > wrote: > > > > > > > > > > > > > > > > Hello Fred, > > > > > > > > > > > > > > > > I made a correction. You can update the rialto.js file > > > > > > > > > > > > > > > > But you have to use the setStyle method of the label > > > > > > > > > > > > > > > > exL.setStyle({whiteSpace : "pre"}); > > > > > > > > > > > > > > > > Cyril > > > > > > > > > > > > > > > > --- In rialto-dev@..., "frederic_viollet" > > > > > > > > <frederic.viollet@> wrote: > > > > > > > > > > > > > > > > > > Hi Cyril, > > > > > > > > > > > > > > > > > > I'm trying to create a Label in which the text is > > > preformatted. > > > > > > Here's > > > > > > > > > the code: > > > > > > > > > var myFrame = new > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > var > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > var exL=new > > > > rialto.widget.Label('exL',15,5,myFrame,"","libelle1"); > > > > > > > > > exL.divExt.style.whiteSpace = "pre";exL.setText(extInfoT); > > > > > > > > > exL.setTextWidth(extInfoT); > > > > > > > > > > > > > > > > > > As you can see, the horizontal scrollbar shouldn't be > > > > > necessary. But > > > > > > > > > the width is computed using the "nowrap" style. Is there > > a way > > > > > > to get > > > > > > > > > the Label's width calculated using it's real style (i.e. > > "pre" > > > > > > in this > > > > > > > > > code)? > > > > > > > > > The problem is that the default (and only supported) > > style for > > > > > > labels > > > > > > > > > seems to be "nowrap". This implies strange behaviors > > > > you try > > > > > > > > > using other formatting styles ("pre", "wrap" , ...). > > > > > > > > > Maybe it could be useful to be able to precise a given > style > > > > > on the > > > > > > > > > label's creation (if one wants to use another style than > > > > > "nowrap"). > > > > > > > > > > > > > > > > > > What do you think about it? > > > > > > > > > > > > > > > > > > Thanks again for your help. > > > > > > > > > > > > > > > > > > Fred > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
| Free Forum Powered by Nabble | Forum Help |