|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Pb with the Popup's setWidthHi Cyril,
I've been a little further now in my code with Popups. And I found another issue; this time with the setWidth function. The problem is that when you call setWidth on a Popup widget, the dropImage area is not re-centered. var ppUp = new rialto.widget.PopUp('ppUp',150,420,'430','120','','Info','transparent',{withCloseButon:true,visible:true}); var theImg = new rialto.widget.Image('rialtoEngine/images/policyManager/information.gif',10,10,ppUp,'','',{position:'absolute',boolFloatLeft:false,boolFloaRight:false,imageDisabled:''}); var theLbl = new rialto.widget.Label('theLbl',15,60,ppUp,"Cette longue phrase a pour but de montrer que l'habillage de la popup n'est pas.\nréadaptée au changement de largeur via l'appel à la fonction setWidth()",'libelle1'); theLbl.setStyle({whiteSpace : "pre"}); ppUp.setWidth(theLbl.getOffsetWidth()+85); ppUp.setHeight(theLbl.getOffsetHeight()+100); var bOk = new rialto.widget.Button(ppUp.getOffsetHeight()-70,ppUp.getOffsetWidth()/2-40,"OK",null,ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); bOk.onclick = function() { ppUp.closeWindow(); } Thanks, Fred |
|
|
Re: Pb with the Popup's setWidthFred,
This one is fixed. For the setHeight you are true, but as you mention the setHeight function set the height of the divExt and not the divCont. Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Hi Cyril, > > I've been a little further now in my code with Popups. And I found > another issue; this time with the setWidth function. > The problem is that when you call setWidth on a Popup widget, the > dropImage area is not re-centered. > > var ppUp = new > > var theImg = new > rialto.widget.Image('rialtoEngine/images/policyManager/information.gif',10,10,ppUp,'','',{position:'absolute',boolFloatLeft:false,boolFloaRight:false,imageDisabled:''}); > var theLbl = new rialto.widget.Label('theLbl',15,60,ppUp,"Cette > longue phrase a pour but de montrer que l'habillage de la popup n'est > pas.\nréadaptée au changement de largeur via l'appel à la fonction > setWidth()",'libelle1'); > theLbl.setStyle({whiteSpace : "pre"}); > ppUp.setWidth(theLbl.getOffsetWidth()+85); > ppUp.setHeight(theLbl.getOffsetHeight()+100); > var bOk = new > rialto.widget.Button(ppUp.getOffsetHeight()-70,ppUp.getOffsetWidth()/2-40,"OK",null,ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); > bOk.onclick = function() { > ppUp.closeWindow(); > } > > Thanks, > > Fred > |
|
|
Re: Pb with the Popup's setWidthFred,
I reply to fast You are true for the setHeight function, the behavior is not the same according to the constructor property. I change it. So now if you create your popup with an height of 150 the result will be the same with a setHeight(150); Cyril --- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote: > > Fred, > > This one is fixed. > > For the setHeight you are true, but as you mention the setHeight > function set the height of the divExt and not the divCont. > > Cyril > > |
|
|
Re: Pb with the Popup's setWidthGreat job!
Thanks Cyril! Fred --- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote: > > Fred, > > I reply to fast > > You are true for the setHeight function, the behavior is not the same > according to the constructor property. I change it. So now if you > create your popup with an height of 150 the result will be the same > with a setHeight(150); > > Cyril > > --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote: > > > > Fred, > > > > This one is fixed. > > > > For the setHeight you are true, but as you mention the setHeight > > function set the height of the divExt and not the divCont. > > > > Cyril > > > > > |
|
|
Re: Pb with the Popup's setWidthOups, Cyril....
I was a little too fast in my tests. There still is a refresh problem when applying a setWidth to a Popup: Try clicking twice on the 'Detail' button. var ppUp = new rialto.widget.PopUp('ppUp',150,250,'550','125','','Error','transparent',{withCloseButon:true}); var errText = new rialto.widget.Label('errText',15, 60,ppUp,"Server error. Please contact your administrator.",'libelle1'); errText.setStyle({whiteSpace : "pre"}); ppUp.setWidth(errText.getOffsetWidth()+85); ppUp.setHeight(errText.getOffsetHeight()+60); var bDet = new rialto.widget.Button(ppUp.getOffsetHeight()-70,ppUp.getOffsetWidth()-130,'Details','',ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); var bOK = new rialto.widget.Button(ppUp.getOffsetHeight()-70,bDet.left-100,"OK","OK",ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); var errTxt1=null; var errTxt2=null; bOK.onclick = function() { ppUp.closeWindow(); } bDet.onclick = function() { if(errTxt1==null) { var iTop=bOK.top+30; var niTop=iTop; errTxt1=new rialto.widget.Label('errTxt1',iTop, 10,ppUp,"internal error",'libelle1'); errTxt1.setStyle({whiteSpace : "pre"}); iTop+=errTxt1.getOffsetHeight()+20; errTxt2 = new rialto.widget.Label('errTxt2',iTop, 10,ppUp,"ProductError, 81011005, Cannot connect to the framework: Network Error: The service are unavailable.\nThe Windows Service \"ProductService\" is probably stopped.\nPlease contact your administrator.\nError code: 0x81011005",'libelle1'); errTxt2.setStyle({whiteSpace : "pre"}); var newH = bOK.top+30+errTxt1.getOffsetHeight()+20+errTxt2.getOffsetHeight()+30; var newW = Math.max(errText.getOffsetWidth()+85, errTxt1.getOffsetWidth()+35); newW = Math.max(newW, errTxt2.getOffsetWidth()+35); } else { var newH = errText.getOffsetHeight()+60; var newW = errText.getOffsetWidth()+85; errTxt2.remove();errTxt2=null; errTxt1.remove();errTxt1=null; } ppUp.setHeight(newH); ppUp.setWidth(newW); bDet.setLeft(ppUp.getOffsetWidth()-130); bOK.setLeft(bDet.left-100); } |
|
|
Re: Pb with the Popup's setWidthCyril,
I forgot to tell you that the horizontal scrollbar only remains in FireFox. With IE, the Popup's width is correct and there is no scrollbar (the only problem with IE is the one I already mentioned : the "pre" style is not applied) Thanks Fred --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Oups, Cyril.... > > I was a little too fast in my tests. There still is a refresh problem > when applying a setWidth to a Popup: > Try clicking twice on the 'Detail' button. > > var ppUp = new > rialto.widget.PopUp('ppUp',150,250,'550','125','','Error','transparent',{withCloseButon:true}); > var errText = new rialto.widget.Label('errText',15, 60,ppUp,"Server > error. Please contact your administrator.",'libelle1'); > errText.setStyle({whiteSpace : "pre"}); > ppUp.setWidth(errText.getOffsetWidth()+85); > ppUp.setHeight(errText.getOffsetHeight()+60); > > var bDet = new > rialto.widget.Button(ppUp.getOffsetHeight()-70,ppUp.getOffsetWidth()-130,'Details','',ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); > var bOK = new > rialto.widget.Button(ppUp.getOffsetHeight()-70,bDet.left-100,"OK","OK",ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); > > var errTxt1=null; > var errTxt2=null; > > bOK.onclick = function() { > ppUp.closeWindow(); > } > > bDet.onclick = function() { > if(errTxt1==null) { > var iTop=bOK.top+30; > var niTop=iTop; > > errTxt1=new rialto.widget.Label('errTxt1',iTop, 10,ppUp,"internal > error",'libelle1'); > errTxt1.setStyle({whiteSpace : "pre"}); > iTop+=errTxt1.getOffsetHeight()+20; > > errTxt2 = new rialto.widget.Label('errTxt2',iTop, > 10,ppUp,"ProductError, 81011005, Cannot connect to the framework: > Network Error: The service are unavailable.\nThe Windows Service > \"ProductService\" is probably stopped.\nPlease contact your > administrator.\nError code: 0x81011005",'libelle1'); > errTxt2.setStyle({whiteSpace : "pre"}); > var newH = > bOK.top+30+errTxt1.getOffsetHeight()+20+errTxt2.getOffsetHeight()+30; > var newW = Math.max(errText.getOffsetWidth()+85, > errTxt1.getOffsetWidth()+35); > newW = Math.max(newW, errTxt2.getOffsetWidth()+35); > } > else { > var newH = errText.getOffsetHeight()+60; > var newW = errText.getOffsetWidth()+85; > errTxt2.remove();errTxt2=null; > errTxt1.remove();errTxt1=null; > } > ppUp.setHeight(newH); > ppUp.setWidth(newW); > bDet.setLeft(ppUp.getOffsetWidth()-130); > bOK.setLeft(bDet.left-100); > } > |
|
|
Re: Pb with the Popup's setWidthHello Fred,
I can see it but i don't understand. It is clearly a refresh bug from FF as the scrollbar diseappear when you move the popup. I try to find an issue and i keep you inform. Cyril --- In rialto-dev@..., "frederic_viollet" <frederic.viollet@...> wrote: > > Cyril, > > I forgot to tell you that the horizontal scrollbar only remains in > FireFox. With IE, the Popup's width is correct and there is no > scrollbar (the only problem with IE is the one I already mentioned : > the "pre" style is not applied) > > Thanks > > Fred > > --- In rialto-dev@..., "frederic_viollet" > <frederic.viollet@> wrote: > > > > Oups, Cyril.... > > > > I was a little too fast in my tests. There still is a refresh problem > > when applying a setWidth to a Popup: > > Try clicking twice on the 'Detail' button. > > > > var ppUp = new > > > > > var errText = new rialto.widget.Label('errText',15, 60,ppUp,"Server > > error. Please contact your administrator.",'libelle1'); > > errText.setStyle({whiteSpace : "pre"}); > > ppUp.setWidth(errText.getOffsetWidth()+85); > > ppUp.setHeight(errText.getOffsetHeight()+60); > > > > var bDet = new > > > rialto.widget.Button(ppUp.getOffsetHeight()-70,ppUp.getOffsetWidth()-130,'Details','',ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); > > var bOK = new > > > rialto.widget.Button(ppUp.getOffsetHeight()-70,bDet.left-100,"OK","OK",ppUp,{enable:true,adaptToText:true,width:88,widthMin:88}); > > > > var errTxt1=null; > > var errTxt2=null; > > > > bOK.onclick = function() { > > ppUp.closeWindow(); > > } > > > > bDet.onclick = function() { > > if(errTxt1==null) { > > var iTop=bOK.top+30; > > var niTop=iTop; > > > > errTxt1=new rialto.widget.Label('errTxt1',iTop, 10,ppUp,"internal > > error",'libelle1'); > > errTxt1.setStyle({whiteSpace : "pre"}); > > iTop+=errTxt1.getOffsetHeight()+20; > > > > errTxt2 = new rialto.widget.Label('errTxt2',iTop, > > 10,ppUp,"ProductError, 81011005, Cannot connect to the framework: > > Network Error: The service are unavailable.\nThe Windows Service > > \"ProductService\" is probably stopped.\nPlease contact your > > administrator.\nError code: 0x81011005",'libelle1'); > > errTxt2.setStyle({whiteSpace : "pre"}); > > var newH = > > bOK.top+30+errTxt1.getOffsetHeight()+20+errTxt2.getOffsetHeight()+30; > > var newW = Math.max(errText.getOffsetWidth()+85, > > errTxt1.getOffsetWidth()+35); > > newW = Math.max(newW, errTxt2.getOffsetWidth()+35); > > } > > else { > > var newH = errText.getOffsetHeight()+60; > > var newW = errText.getOffsetWidth()+85; > > errTxt2.remove();errTxt2=null; > > errTxt1.remove();errTxt1=null; > > } > > ppUp.setHeight(newH); > > ppUp.setWidth(newW); > > bDet.setLeft(ppUp.getOffsetWidth()-130); > > bOK.setLeft(bDet.left-100); > > } > > > |
| Free Forum Powered by Nabble | Forum Help |