Prevent text wrapping or image resizing


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

For your scenario you can take advantage of the table shape. For example, to create a table shape with an image and a text underneath you can use the following piece of code:

NTableShape table = new NTableShape();

document.ActiveLayer.AddChild(table);

table.ShowGrid = false;

table.InitTable(1, 2);

table.BeginUpdate();

 

table[0, 0].Bitmap = new Bitmap(@"D:\Image.png");

table[0, 1].Text = "Sample Text";

 

table.EndUpdate();

table.Location = new NPointF(100, 100);

Note that table shapes are not resizable. They are automatically sized to fit their content.



Best Regards,
Nevron Support Team


Rotha Aing
Rotha Aing
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
Hello,

I need to generate shapes with a bitmap and text label underneath. The issue is that I want to have the image retain a certain size and for the text underneath to not become wrapped.

Currently I am using a ImageFillStyle and I have tried replacing the default label on the shapes with a NLogicalLineLabel but this causes the drawing view to show some weird graphics trail when moving the shape around (and a bit of performance hit).

Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search