Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM
  New Posts New Posts RSS Feed - List Box Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedList Box Question

 Post Reply Post Reply
Author
Message
arezoosaboori View Drop Down
Newbie
Newbie


Joined: 27 December 2008
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote arezoosaboori Quote  Post ReplyReply Direct Link To This Post Topic: List Box Question
    Posted: 27 December 2008 at 4:32am
Hi,
I use this code to add items to a list box:

       ListBoxMarkup.AddItem "<Border BorderThickness='2' BorderBrush='DodgerBlue' Margin='0, 2, 0, 2' Padding='3'><StackPanel Orientation='Horizontal'>" & _
       "<Image Source='100'/>" & _
       "<Grid><Grid.ColumnDefinitions><ColumnDefinition Width='Auto'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>" & _
       "<Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions>" & _
       "<TextBlock TextAlignment='Right' FontWeight='Bold' Foreground='Navy' Text='IP:'/>" & _
       "<TextBlock TextAlignment='Right' Grid.Row='1' FontWeight='Bold' Foreground='Navy' Text='Country:'/>" & _
       "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Text='" & MyResult(0) & "'/>" & _
       "<TextBlock Margin='6, 0, 0, 0'  Grid.Column='1' Grid.Row='1'  Text='" & "Loopback" & "'/>" & _
       "</Grid></StackPanel></Border>"

And result is like this:



There are 4 items added to the list box, I just want the 2 inner items with flags to be changed : I want flags in the right .
Is that possible to only move icons/flags to the right?
Thank you for your help :)



Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2008 at 3:11am
So just change order of Image and Grid.
Move
"<Image Source='100'/>"
after
</Grid>
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
arezoosaboori View Drop Down
Newbie
Newbie


Joined: 27 December 2008
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote arezoosaboori Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2008 at 6:18am
Hello and thank you very much for your tip
That works but still items are sticky and not having a good view!
So can I send icons to the right corner?
Where marked in this picture?
Thank you a lot


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 December 2008 at 5:52am
Hi,
 
Try this
 
ListBoxMarkup.AddItem "<Border BorderThickness='2' BorderBrush='DodgerBlue' Margin='0, 2, 0, 2' Padding='3'><Grid>" & _
       "<Grid><Grid.ColumnDefinitions><ColumnDefinition Width='Auto'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>" & _
       "<Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions>" & _
       "<TextBlock TextAlignment='Right' FontWeight='Bold' Foreground='Navy' Text='IP:'/>" & _
       "<TextBlock TextAlignment='Right' Grid.Row='1' FontWeight='Bold' Foreground='Navy' Text='Country:'/>" & _
       "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Text='Hi'/>" & _
       "<TextBlock Margin='6, 0, 0, 0'  Grid.Column='1' Grid.Row='1'  Text='" & "Loopback" & "'/>" & _
       "</Grid>" & _
       "<Image HorizontalAlignment='Right' Source='100'/>" & _
        "</Grid></Border>"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.