Last post Nov 19, 2007 11:33 AM by CurtWRC
Nov 18, 2007 11:47 AM|mailrup|LINK
There is a requirement where in based on the amount of text i get from the database, i need to create an image on the fly with the data...
I had done it in the usual way following all the examples..
Initially i had created a bitmap image of size (x,y)
and i had created another rectangle of size (x,y) and am adding the data from the database to the rectangle..
there are situations where in the Data is greater that the space of the rectangle.. in this case i need to resize the rectangle with the original calculated height..
how can i do this ? please help..
Nov 19, 2007 11:33 AM|CurtWRC|LINK
If Ive understood your question correctly you are looking for a way of increasing the size of your on the fly image depending on the amount of text you wish to display. I suppose one way you could do it is by making x a variable and changing that variable
depending on the length of the text like so:
Dim text as string = (data text here)
Dim x as integer = 300 'Default Value
if x.length > 100 then
x = 600
elseif x.length > 150 then
x = 1000