473,412 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Drawing wrapped text

Hi all,

I want to be able to draw wrapped text started at a point x into the
rectangle on the first line
If there's not a GDI+ method for this, i'm guessing it's a common technique,
but can't seem to find an example.

for example

normal DrawString(string, font, brush, xpos, width) (from memory)

so this is fine for drawing

My name is sam
and drawstring
automatically
wrapped this for
me.

however, i want to start the first line 50px in
i.e.

My name
is sam and
drawstring
automatically
wrapped this for
me.

See what i mean?

any help appreaciated

sam
Nov 16 '05 #1
2 3239
You must specify rectangle of your text position and then GDI+ it self will
wrap your text.

"Sam Martin" wrote:
Hi all,

I want to be able to draw wrapped text started at a point x into the
rectangle on the first line
If there's not a GDI+ method for this, i'm guessing it's a common technique,
but can't seem to find an example.

for example

normal DrawString(string, font, brush, xpos, width) (from memory)

so this is fine for drawing

My name is sam
and drawstring
automatically
wrapped this for
me.

however, i want to start the first line 50px in
i.e.

My name
is sam and
drawstring
automatically
wrapped this for
me.

See what i mean?

any help appreaciated

sam

Nov 16 '05 #2
yeah, i know.
but don't necessary want to start the text rendering at point 0,0 or the
block.

how would you go about inserting an indent?
tia
sam

"Mohammad-Reza" <Mo**********@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
You must specify rectangle of your text position and then GDI+ it self
will
wrap your text.

"Sam Martin" wrote:
Hi all,

I want to be able to draw wrapped text started at a point x into the
rectangle on the first line
If there's not a GDI+ method for this, i'm guessing it's a common
technique,
but can't seem to find an example.

for example

normal DrawString(string, font, brush, xpos, width) (from memory)

so this is fine for drawing

My name is sam
and drawstring
automatically
wrapped this for
me.

however, i want to start the first line 50px in
i.e.

My name
is sam and
drawstring
automatically
wrapped this for
me.

See what i mean?

any help appreaciated

sam

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jonathan | last post by:
I have a specific situation where I am applying padding to text inside of a "P" tag, where if the text wraps then the second line of text ignores the padding. Here is a snippet of what I am doing:...
4
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text...
13
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
0
by: Hasim AH | last post by:
Hi .. Just getting interested to learn C# and needs help. I want to write C# application so that the program will execute and draw graphics when the user select the drawing menu from the main...
11
by: dongarbage | last post by:
Hi there, I'm very much a C# novice. How do you do freehand drawing on a panel with a mouse in c#? Thanks, Don
11
by: cty0000 | last post by:
I have some quiestion... I want to draw line,point,rectangles and etc... on the from So I code like this.. public update() { g = this.CreateGraphics(); g.FillRectangle(Brushes.White, x1,...
0
by: emilnordiclake | last post by:
(C#, Microsoft .NET Framework 3.5) Hello! I'm in the process of creating a custom text control and I want to add functionality for superscripts and subscripts. I'm using TextRenderer for...
1
by: Wepic | last post by:
render :update returns js wrapped in a HTML body Hi. From what I'm learned the below is suppose to return "alert('Im JS');" to the javascriptGenerator that's suppose to make the page scream...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.