Gurus:
Is there a way to have variable values display as multi-line output in Control Pages? I have tried embedding \r, \n and \r\n in the values but Indigo just seems to eat the line ending characters.
Richard
berkinet wrote:s there a way to have variable values display as multi-line output in Control Pages? I have tried embedding \r, \n and \r\n in the values but Indigo just seems to eat the line ending characters.
jay wrote:I thought of that, but what I want to display is a list of the sprinklers scheduled for the day. I have 8 zones and each zone schedule is independent and many are "every n days" (they are time separated to avoid collisions). So, I could have 8 variables and display them all with valid or null values. But, then the list would always have holes in it, sort of ugly. Also, I want this to display in Indigo Touch and screen real-estate there is limited....I'll see how much trouble that would be to do in IWS. Only issue really is also making the change to the graphical renderer in Indigo Touch...
Of course, the clever workaround is to have a variable for each (potential) line of your value and just fill in the appropriate variable with the right value. UGLY, but it would work...
jsmorris wrote:Could you send me the change you made. I found the old topic, but it didn't contain the details of your edits.Even better might be to optionally allow embedded HTML. I patched IWS (see earlier post several months ago for details) to suppress entity encoding if the first character in the caption name is "<". ...
jsmorris then wrote:I sort of cheated to solve that same problem, I just downloaded the full set of weather icons, converted them to png and then copy the appropriate image to current.png and current+true.png.I also use it to embed an href link to a weather image from the web,
berkinet wrote:Could you send me the change you made. I found the old topic, but it didn't contain the details of your edits.
berkinet later wrote:I sort of cheated to solve that same problem, I just downloaded the full set of weather icons, converted them to png and then copy the appropriate image to current.png and current+true.png.
jsmorris wrote:Thanks, that would be great.berkinet wrote:Could you send me the change you made. I found the old topic, but it didn't contain the details of your edits.
I couldn't find the details either. I'll have to extract them from the source code again. I should be able to get to that later tonight.
jsmorris went on and wrote:Makes sense.I should have been more specific. The image embedded in my control page is a dynamic weather radar image. It updates about every six minutes...
berkinet wrote:Could you send me the change you made. I found the old topic, but it didn't contain the details of your edits.
<div style="position: absolute; top:0px; left:0px; width:68px; height:52px">
<div style="position: absolute">
<div style="position:absolute; top:-1px; left:4px; width:62px; height:52px">
<table><tr><td width="62" height="52" align="center" valign="middle">
<div style="font-family: Arial, Helvetica, sans-serif;
font-size: 9px; font-weight: bold; color: #000000;">
LIVING<br>
ROOM<br>
LAMP
</div></td></tr></table></div></a></div></div>
090 #if $pageElem.captionName
091 ${clickRefStart, entityEncoding='skip'}
092 <div class="captionName" style="
093 font-family: ${pageElem.captionFontFamily, entityEncoding='skip'};
094 font-size: ${pageElem.captionPointSize}px;
095 color: ${pageElem.captionColor};
096 $pageElem.captionPosStyle"
097 >
098 ${pageElem.captionName}
099 </div>
100 ${clickRefEnd, entityEncoding='skip'}
101 #end if
#if $pageElem.captionName[0:1] == "<"
${clickRefStart, entityEncoding='skip'}
<div>
${pageElem.captionName, entityEncoding='skip'}
</div>
${clickRefEnd, entityEncoding='skip'}
#else
#end if
365 elif self.controlType == 2: # --- variable state control type ---
366 if self.imageFileName:
367 self.imageFilePath += u"variables/" + self.imageFileName
368
369 if self.targetElemName:
370 if self.imageFilePath:
371 if self.controlValueRaw == u"false":
372 pass # NOP; use base file name already assigned
373 else:
374 self.imageFilePath = self.imageFilePath[:-4] + u"+true.png"
374 self.imageFilePath = self.imageFilePath[:-4] + u"+" + self.controlValueRaw + u".png"
Berkinet wrote:OTOH, I didn't realize that the html tag hack was for captions. I was looking for the same feature for values. Do you know if that can be done as well?
Users browsing this forum: No registered users and 8 guests