How to force line break? - Zooper Widget General

I am trying a new weather widget that provides weather conditions in text form. Occasionally the text it too long to fit on one line so I need to be able to force a line break in the incoming text. How do I do that?
Thanks in advance.
DerrikMo

Wrong thread

Mokum020 said:
How about something like this in a Rich Text module:
Code:
[tr=0,4]#WCCOND#[/tr]
[tr=4,20]#WCCOND# [/tr]
I don't know at wich letter you want the line break so my example is after the fourth letter.
On the first line the first four letters will be shown and on the second line (cropped) from the fifth to the twentieth letter.
You need some empty spaces (and calculate them yourself as after which letter you want the line break) in the second line because otherwise Zooper will show the text if it becomes the same or smaller as the crop start point.
Click to expand...
Click to collapse
Very crafty. And yes line breaks seem only to be avaialable in Rich Text, and to truncate/substring is good to shorten a line (and sometimes it adds the dots "...") but, both together is a cool way to do it!

Wrong thread

Mokum020 said:
How about something like this in a Rich Text module:
Code:
[tr=0,4]#WCCOND#[/tr]
[tr=4,20]#WCCOND# [/tr]
I don't know at wich letter you want the line break so my example is after the fourth letter.
On the first line the first four letters will be shown and on the second line (cropped) from the fifth to the twentieth letter.
You need some empty spaces (and calculate them yourself as after which letter you want the line break) in the second line because otherwise Zooper will show the text if it becomes the same or smaller as the crop start point.
Click to expand...
Click to collapse
Thanks for the help. I wasn't able to use the solution however, because the length of the text that I want on the 1st line is always variable. The second portion of the text comes from a different feed, so I just decided to make a different field and put that field below the 1st. But your suggestion did come in handy on a different portion of the widget. I will keep your suggestion in my stash of Zooper tricks.
Thanks again,
DerrikMo

Wrong thread

Related

My SMS screen in M2D keeps screwing up.

I'm running the ATT stock rom minus bloat. When I recieve a text, half the time it doesn't scroll down to the most recent text. I have to scroll down manually. If I close the message app and then reopen it, it usually does scroll to the most recent text. Also, the area in which you type your message is chopped in half, so you can't see what you've typed. I had this same issue on my Tilt and now I'm having it on my Tilt 2. On my Tilt, I was even running a modified rom.
When I have that half line of text I open up the onscreen keyboard, close it and my text box is back to normal. Another suggestion was to make the text box 4 lines instead of 2, so even if you have hte issue you still have 2 1/2 lines. I have the same thing with the most recent text, but I live with it because its not too bothersome.
How do you make it four?
Not sure how that is done?
I was looking for a while and couldn't find the post I was refeering to, all I could find was something for the tp1:
Are there ways to enlarge the sms typing area?
you can use the freeware "TOTAL COMMANDER" and edit the file thread_sms.html. You can do a search to easily find it...windows directory.
look for this part:
<inbox:content id="COMPOSESUBECT" width="98%" height=35 spell...
and play around with the number in height (in this case 35). change to 70 and get 3 lines for text replies. Just change the numbers and see what works for you.
*you need to soft reset after editing the file.
Click to expand...
Click to collapse
http://forum.ppcgeeks.com/showthread.php?t=42141
here is some more info:
http://social.microsoft.com/Forums/en/windowsmobilehelp/thread/39f90a31-0b60-4443-b58c-543a1703d8e9

[Q] Can text grow and shrink automatically?

*I have rich text showing the time with one line as the hour and one line as the minutes spelling out as "nine" and "seventeen" for example. Is there a way to have the text automatically fill entirely from right to left depending on what is currently displayed since "o' nine" is shorter than "seventeen" where you have to select a smaller size to be able to fit seventeen where o' nine becomes too small.
jes02ade said:
*I have rich text showing the time with one line as the hour and one line as the minutes spelling out as "nine" and "seventeen" for example. Is there a way to have the text automatically fill entirely from right to left depending on what is currently displayed since "o' nine" is shorter than "seventeen" where you have to select a smaller size to be able to fit seventeen where o' nine becomes too small.
Click to expand...
Click to collapse
In short: no. That function is currently not available in Zooper.

Link am/pm marker to event calendar time

Hi,
I remember reading once how to link to am/pm marker to a calendar event. So that if you are in the AM and looking at a calendar event in the PM, the calendar event time will display correctly.
I know it is some combination of #C0Sh:mm# and #Da# but for some reason when I write #C0Sh:mm Da# I get "3:00 350PM" and when I type #C0Sh:mm da# I get "3:00 16PM"
I have done this is the past successfully, anyone know the correct format?
Also, is there a way to force the AM/PM markers to lowercase
Any help is much appreciated
Thanks,
Brad
restinbeast said:
Hi,
I remember reading once how to link to am/pm marker to a calendar event. So that if you are in the AM and looking at a calendar event in the PM, the calendar event time will display correctly.
I know it is some combination of #C0Sh:mm# and #Da# but for some reason when I write #C0Sh:mm Da# I get "3:00 350PM" and when I type #C0Sh:mm da# I get "3:00 16PM"
I have done this is the past successfully, anyone know the correct format?
Also, is there a way to force the AM/PM markers to lowercase
Any help is much appreciated
Thanks,
Brad
Click to expand...
Click to collapse
The D is used to identify a date tag and the a is the AM/PM marker. If you want do use it in a calendar event tag, you have to omit the D and use just the a. In your case that would read:
Code:
#C0Sh:mm a#
Now, if you want to force it to small caps, you'll have to use a Rich Text Module with the [tl][/tl](to lowercase) BBCode and split up the tags so it looks like this:
Code:
#C0Sh:mm# [tl]#C0Sa#[/tl]
Hope this helps you out
kwerdenker said:
The D is used to identify a date tag and the a is the AM/PM marker. If you want do use it in a calendar event tag, you have to omit the D and use just the a. In your case that would read:
Code:
#C0Sh:mm a#
Now, if you want to force it to small caps, you'll have to use a Rich Text Module with the [tl][/tl](to lowercase) BBCode and split up the tags so it looks like this:
Code:
#C0Sh:mm# [tl]#C0Sa#[/tl]
Hope this helps you out
Click to expand...
Click to collapse
Many thanks (hit the thanks button)
I need to write this down, second time I had to ask for help on this. Some kind of mental block with it heh.

[Q] 2 Questions about limiting the size of text in Zooper

I am making a spin-off of infobar, and I have it mostly working the want I want with two exceptions:
1) The weather string is usually fine, but in some cases it gets too large. Is there any way to get it to wrap to a specific bounding rectangle, or to shrink it if it gets past a certain length? Is there some way to test how long the string is? I don't want to use [tr], because I want to see the whole string.
2) Right now I am using [tr=0,25] to make sure the appointments don't overrun the box. I use [tr=0,25] instead of [tr=25] because I don't want the "..." for shorter strings. Is there some way to test the length of the string so I can only use the [tr] when I need to? That way I can get the "..." when it is appropriate. I tried using
$[tr=0,22]#C0TITLE#[tr]=#C0TITLE#?#C0TITLE#: [tr=22]#C0TITLE#[/tr]$
but the [tr=0,22]#C0TITLE#[tr]=#C0TITLE# always comes back as not equal.
Thanks.
mlkaufman said:
I am making a spin-off of infobar, and I have it mostly working the want I want with two exceptions:
1) The weather string is usually fine, but in some cases it gets too large. Is there any way to get it to wrap to a specific bounding rectangle, or to shrink it if it gets past a certain length? Is there some way to test how long the string is? I don't want to use [tr], because I want to see the whole string.
2) Right now I am using [tr=0,25] to make sure the appointments don't overrun the box. I use [tr=0,25] instead of [tr=25] because I don't want the "..." for shorter strings. Is there some way to test the length of the string so I can only use the [tr] when I need to? That way I can get the "..." when it is appropriate. I tried using
$[tr=0,22]#C0TITLE#[tr]=#C0TITLE#?#C0TITLE#: [tr=22]#C0TITLE#[/tr]$
but the [tr=0,22]#C0TITLE#[tr]=#C0TITLE# always comes back as not equal.
Thanks.
Click to expand...
Click to collapse
There is currently no way to test the length of a string in Zooper, sorry. As to the "wrap to a specific bounding rectangle", check out the X margin and Lines on a Rich Text Module The first defines the distance in pixels from the screen side when the text will break into additional lines. The second option sets into how many lines the text will break at maximum. Anything above that will be cut-off without an indicator like you get with the trim option. It's not exactly what you are looking for but I thought you might want another option to work with

[Q] Weather Condition Text on Multiple Lines?

Hi
Is there any way to get the weather conditions to split each word onto multiple lines?
eg. "Partly Cloudy" to display as
Partly
Cloudy
I'm trying to get the text to display on a specific image that is in my background bitmap.
Any help is much appreciated.
Are you using Rich Text or regular?
Rich text give you the option. One of the guru's here might have a different idea.
Sent from my Nexus 5 using Tapatalk
I'm trying to use regular text, as I'm setting a rotation, which I don't think Rich Text can handle.
I've tried a few different things to get the text to split across multiple lines without any success, so thought I'd see how to do it using the rich text.
It's got me completely befuddled.
Could someone point me in the right direction as to how I might achieve the text split?
Also, I've seen a number of widgets with custom icons in them. How do you embed icons from an icon pack in a widget; if at all possible. I may be mistaking the widget creation for something to do with a theme creation.
Any help is appreciated.
CPAPerseus said:
Could someone point me in the right direction as to how I might achieve the text split?
.
Click to expand...
Click to collapse
If you are cannot use rich text that limits you severely, and I'm not sure it is possible with Zooper alone. You can use tasker to do this, however. this will require some research on your part, but you can do an HTTP Get action in tasker to retrieve the weather condition for your location, and then perform a variable split to produce two variables, one for the first word of the weather condition, and a second variable for the second word. You would then send these to Zooper using the #T...# format.
So it is possible if you cannot use Rich Text objects in Zooper, it just requires more work on that back end.
For me I can only get Rich Text to wrap onto multiple lines if it is near the edge of the screen.
Use rich text. Set two lines and keep on increasing x-margin till it shows as two lines. For example to get two lines to show on my widget my margin number is 520. Text on different areas of the screen requires different x-margin.

Categories

Resources