PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms text allignment in richtext boxes

Reply

text allignment in richtext boxes

 
Thread Tools Rate Thread
Old 02-09-2003, 07:05 AM   #1
Ramana
Guest
 
Posts: n/a
Default text allignment in richtext boxes


Hi,
When I use two rich textboxes with and without multiline property is TRUE,
The test alignment (left) is not same for both the text boxes.
If the multiline property is TRUE then I am getting a small gap between the
text and the left edge, whereas the text is almost touching the left edge if
the mutliline property is False.

For combo boxes I am getting more gap between the text and the left edge.
How to get the uniform gap for all the UI controls? I am using the same font
for all controls. We are getting comments from our UI review team due to
this inconsistent text alignment.

Advance thanks.

Ramana


  Reply With Quote
Old 02-09-2003, 01:21 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: text allignment in richtext boxes

Hello,

"Ramana" <vrkorada@hotmail.com> schrieb:
> For combo boxes I am getting more gap between the text and
> the left edge. How to get the uniform gap for all the UI controls?
> I am using the same font for all controls. We are getting comments
> from our UI review team due to this inconsistent text alignment.


PInvoke: 'SendMessage' + 'EM_SETMARGINS':

http://msdn.microsoft.com/library/e..._setmargins.asp

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet


  Reply With Quote
Old 02-09-2003, 04:05 PM   #3
Ramana
Guest
 
Posts: n/a
Default Re: text allignment in richtext boxes

I think the solution involves lowlevel win32 API calls. I think I need to
subclass all the basic edit controls to accomplish this. Is there any way I
can do this in C# with out subclassing the basic edit controls?

Ramana

"Herfried K. Wagner [MVP]" <hirf.nosp@m.activevb.de> wrote in message
news:uKqCc1UcDHA.3708@tk2msftngp13.phx.gbl...
> Hello,
>
> "Ramana" <vrkorada@hotmail.com> schrieb:
> > For combo boxes I am getting more gap between the text and
> > the left edge. How to get the uniform gap for all the UI controls?
> > I am using the same font for all controls. We are getting comments
> > from our UI review team due to this inconsistent text alignment.

>
> PInvoke: 'SendMessage' + 'EM_SETMARGINS':
>
>

http://msdn.microsoft.com/library/e...ctls/editcontro
ls/editcontrolreference/editcontrolmessages/em_setmargins.asp
>
> HTH,
> Herfried K. Wagner
> --
> MVP · VB Classic, VB.NET
> http://www.mvps.org/dotnet
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off