What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! Bug Reports » [Bug] Correct height of ListBox

[Bug] Correct height of ListBox
Author: Message:
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
O.P. [Bug] Correct height of ListBox
While working on some script, I coded the following.
code:
<Control xsi:type="ListBoxControl" Id="lstSettingsPages">
    <Position Left="5" Top="40" Width="70" Height="218"/>
    <Items>
        <!-- ... -->
    </Items>
</Control>
I cannot set a correct height, look at the following image:
[Image: 2s9c6th.png]

With 218, the box is too low, with 219, it is too high, why is there such a big jump between the both?

Windows XP Service Pack 2 (5.1.2600)
Windows Live Messenger 9.0.1407
Messenger Plus! Live 4.60.0.326
Skin: Apple Live Messenger 0.2.0
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
05-07-2008 10:42 AM
Profile E-Mail PM Web Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: [Bug] Correct height of ListBox
It has to fit a whole number of list items.

This post was edited on 05-07-2008 at 01:04 PM by Volv.
05-07-2008 01:03 PM
Profile PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
O.P. RE: [Bug] Correct height of ListBox
Then compare the height of the darkgrey bar on top of the Listbox, THAT is the height of one item. The difference at the bottom is much more than just 1 listbox item line.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
05-07-2008 01:16 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: [Bug] Correct height of ListBox
Have you made the measurements be in pixels? (I forget where it is, NF know and that's all that matters for me :P)
[Image: markee.png]
05-08-2008 02:14 AM
Profile PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
O.P. RE: [Bug] Correct height of ListBox
No, I had the measurements in dialog units, but dialog units should as well not be that high, should they? *wonders

I will try your suggestion and post back here.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
05-08-2008 07:06 AM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [Bug] Correct height of ListBox
Try:
code:
<Position Left="5" Top="40" Width="70" Height="218"/>
   <Units>SizePixels</Units>
</Position>
This will keep the Left and Top values in dialog units (1 unit = 1.5 pixels), but will interpret the Width and Height values as pixels. Eventually, you can use AllPixels instead of SizePixels to have Left and Top also in pixels. It's easier for me to work that way as it lets me perfectly position a control or element. :)

EDIT: But indeed, that small change seems to make the list box lots higher! :O Are you sure you don't have a typo in the XML?

This post was edited on 05-08-2008 at 04:10 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-08-2008 04:09 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Bug] Correct height of ListBox
quote:
Originally posted by Mattike
Try:
code:
<Position Left="5" Top="40" Width="70" Height="218"/>
   <Units>SizePixels</Units>
</Position>
This will keep the Left and Top values in dialog units (1 unit = 1.5 pixels), but will interpret the Width and Height values as pixels. Eventually, you can use AllPixels instead of SizePixels to have Left and Top also in pixels. It's easier for me to work that way as it lets me perfectly position a control or element. :)
will work perfect on most default desktops. But people with different display settings like DPI stuff and all that other mambo jambo will see screwed up dialogs (well not really screwed up, but not the stuff you intended anyways)...

In short: 1 dialog unit isn't always 1.5 pixel. So better use dialog units...

(^^ what others tell me todo, personally I would use pixels too though :p especially since any graphical content you use is defined in pixels and thus to align something perfectly to that you need to use pixels too.... But Patchou and others would probably shake their heads at this and tell me to use dialog units and make the dialogs with graphics in such a way that they will always look 'aligned', aka don't use a graphic as the base to align and design controls or windows, only use them as 'touch-ups')

This post was edited on 05-08-2008 at 05:03 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-08-2008 05:01 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On