Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Images in table rows (Read 1166 times)
mozzis
YaBB Newbies
*
Offline



Posts: 3
Joined: Apr 9th, 2007
Images in table rows
Apr 9th, 2007 at 11:49pm
Print Post  
I have downloaded FC.Net 4.3 demo and am writing a program using C# in Visual Studio 2005.

When I assign an image to a table, the ImageAlign setting works as expected.
When I assign an image to a table cell, Images always are smaller than the table cell and aligned on the left hand side.
Is this by design?

[code]
Bitmap bmp = new Bitmap(strIconName, false);
Table item = new Table(_diagram);
item.Caption = strClassName;
item.Image = bmp;
item.ImageAlign = ImageAlign.Stretch;
_diagram.Add(item, true);
[/code]

[img]http://www.mza.com/~morris/fcnetq2.png[/img]

[code]
Bitmap bmp = new Bitmap(strIconName, false);
Table item = new Table(_diagram);
item.RedimTable(1, 2);
item.Caption = strClassName;
item[0, 1].Text = "";
item[0, 1].Image = bmp;
item[0, 1].ImageAlign = ImageAlign.Stretch;
_diagram.Add(item, true);
[/code]

[img]http://www.mza.com/~morris/fcnetq1.png[/img]
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Images in table rows
Reply #1 - Apr 10th, 2007 at 3:12am
Print Post  
It seems the only column in the table has smaller width than the table itself. That cannot be seen from the image because the control never draws the right borders for the right-most cells. You can fix the alignment problem by setting

table.Columns[0].ColumnStyle = ColumnStyle.AutoWidth;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint