Shoutbox

LstViewControl - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: LstViewControl (/showthread.php?tid=68966)

LstViewControl by SnuZZer on 11-29-2006 at 07:03 PM

Hi.
I have made a LstViewControl wich contains three columns.
I'll try to find the right size of the LstViewControl and the columns, but when i adjust the size it "push" the columns, it mades them bigger.
I can't avoid the bottomscroller.

The meaning is that you can see all three columns without scroll.

Heres a picture of how it looks now:
[Image: lstviewcontrol.gif]

code:
        <Control xsi:type="ListViewControl" Id="liste">
            <Position Top="17" Left="5" Width="300" Height="130">
                <Anchor Horizontal="LeftRightFixed" Vertical="TopBottomFixed"/>
            </Position>

            <Attributes>
                <AutoTip>true</AutoTip>
                <AlwaysShowSelection>false</AlwaysShowSelection>
            </Attributes>

            <ReportView>
                <HeaderDragDrop>true</HeaderDragDrop>
                <HasCheckboxes>false</HasCheckboxes>
                <SortColHeader>true</SortColHeader>
            </ReportView>

            <Columns>
                <Column>
                    <ColumnId>Kunstner</ColumnId>
                    <Label>Kunstner</Label>
                    <Width>50</Width>
                </Column>
                <Column>
                    <ColumnId>Nummer</ColumnId>
                    <Label>Nummer</Label>
                    <Width>50</Width>
                </Column>
                <Column>
                    <ColumnId>Album</ColumnId>
                    <Label>Album</Label>
                    <Width>50</Width>
                </Column>
            </Columns>
        </Control>

Thanks in advance.
RE: LstViewControl by Eljay on 11-29-2006 at 07:11 PM

The column width attribute is (by default) in percentages not in pixels/dialog units.


RE: LstViewControl by Matti on 11-29-2006 at 07:15 PM

As far as I know, the Width accepts an integer indicating the column width in percent, so when you use 3 times 50, you have a total of 150, hence the scrollbar. I recommend you to use something like 33 or 30, so everything will fit nicely in it. ;)

However, if you want the columns to be 50 pixels wide instead of 50 percent, you can add the WidthFormat attribute to the Columns element, like this:

code:
<Columns WidthFormat="Absolute">
...
</Columns>
so all widths will be interpreted as absolute.
RE: LstViewControl by SnuZZer on 11-29-2006 at 07:20 PM

Hi.
Ohh thanks for the quickly respons!
It works! I didn't knew that it was percent ;-)

Many thanks!