Main Menu
· Home
· Forum
· Themes
· FAQ
· Links


Latest Forum Posts
photofx on 21 Sep : 18:32
that's something that i'm hoping all modules wil[more]

photofx on 21 Sep : 18:24
actually i belive i have truetransparency set (win[more]

Andymon on 21 Sep : 13:12
Maybe some solutions:
1. The Entrys suppo[more]

Andymon on 21 Sep : 13:07
No known systray module can use AlphaMap, but you [more]

Wolzly on 21 Sep : 08:57
Okay I don't even know if I'm using the right term[more]


News for 2004
MoTuWeThFrSaSu
 12345
6789101112
13141516171819
20212223242526
27282930 
 


Backend
Our headlines can be syndicated by using either our rss or text feeds.
news.xml - news.txt






  The Litestep Site for News, Modules, Sources, and all the other stuff around Litestep.
 
 
 

Username:    Password:    Remember me     Signup

 
LS-Universe.info -> Forums -> Modules -> centered label group
<< Previous thread | Next thread >>  

centered label group


Author Post
muhKuh
Thread: centered label group
             Fri Jul 30 2004, 09:21PM

Registered Member #55
Joined Fri Jun 25 2004, 10:59PM
posts 22
hi, i could use a little push into the right direction - what im trying to achieve is a centered clock, but because of the font not having fixed width chars the labels need to adjust dynamically. I need 2 labels [at least i think i do] because the hours:minutes have a bigger font size than the seconds attached to the lower right - they both use a different font too. How would i get these to labels to be centerd inside of a third one?
Back to top
ElkMonster
Thread: centered label group
             Sat Jul 31 2004, 03:47AM

Registered Member #5
Joined: Fri Apr 30 2004, 12:30AM
posts 59
if i understand, you have a label with hours:minutes and another one with seconds, and you want these two to behave like if they were one, right?
ex.:
 
 |-- L3 --|___ L1 _:_|_ L2 _|-- L3 --| 
 
-> like this, where the centre lies at the ":"?

well if so, we have

L3w = L1w + L2w + a
a = L3w - L1w - L2w
L1x = a/2
= (L3w - L1w - L2w)/2

... where x stands for YourLabelX and w for YourLabel(Current)Width.

hm, this should be it, although i'm too tired to really think about it.
hopefully it is what you actually were asking for
Back to top
muhKuh
Thread: centered label group
             Thu Aug 05 2004, 11:24AM

Registered Member #55
Joined: Fri Jun 25 2004, 10:59PM
posts 22
ffs - where did my reply go? guess i gotta explain it a second second time, baaah ...

well, basically u understood this right, but the font im using doesnt have a fixed width for all its chars and so 11:18 is way shorter than 24:33 and so a fixed positioning like u suggested and like i already have now is no solution =(
these 2 inner labels should be centerd as a unit and i hope that is possible ...
Back to top
Cerbie
Thread: centered label group
             Thu Aug 05 2004, 12:58PM

Registered Member #26
Joined: Fri May 14 2004, 05:32AM
posts 65
If you want it to change size with the text, I don't think you can do it without very specific scripting (not worth the hassle). What you CAN do is have, say, for 24:33, the 24(:?) label at the max width needed, and the (:?)33 label at the max width needed, and position them accordingly.
Back to top
muhKuh
Thread: centered label group
             Thu Aug 05 2004, 07:34PM

Registered Member #55
Joined: Fri Jun 25 2004, 10:59PM
posts 22
24:33 - that us one label - the seconds are seperated ... see this
http://520032002460-0001.bei.t-online.de/timeLabels.png
looks odd while displaying 19:12, doesnt it?

got some crazy idea now - xLabel can display html, cant it?
ill try centering it as html code inside - i hope it will still recognize the escape sequences for the time to display ... lets try ...
Back to top
muhKuh
Thread: centered label group
             Sat Aug 07 2004, 04:28PM

Registered Member #55
Joined: Fri Jun 25 2004, 10:59PM
posts 22
ok, that HTML attempt did it

 
 TimeLabelText "<font face='standard 07_53' size=24 color=#&
#036;AllLabelsFontColor$>[time('ii:nn')]</font> 
 <font face='nonstep' size=10 color=#$AllLabelsFontColor$>&nbs
p;[time('ss')]</font> 
 


- nearly -

there might be a small chance of xLabel understanding a table tag?
Its centered and looking like it was intended to, but its jumping because of the font :/

Back to top

Quick Reply:

 

Jump:     Back to top

 

© by LS-Universe.info