Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Oct 20, 2017 9:07 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem with CellTextPaint Event. Not painting correctly
PostPosted: Mon May 27, 2013 1:52 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
Hi,

Another of those moments... I'm using the following code in a Listbox CellTextPaint

If Me.Selected(row) = True Then
g.ForeColor = RGB(0,0,0)
End If

If row = 0 Then
g.DrawString Me.Cell(row, column), x, 15, g.width - (x + 3) , False
else
Return False
End If


The selected color works perfectly, however I´m trying to get the text into two lines in column one, the code I have above works perfectly but only for the first Row, the following rows are not being drawn properly, plus the column in the thrid row is being split into two lines. Am I missing something?

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with CellTextPaint Event. Not painting correctly
PostPosted: Mon May 27, 2013 2:00 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
Quote:
works perfectly but only for the first Row

You're only drawing it in the first row...
Quote:
If row = 0 Then

The other rows you are returning false so RB handles the drawing in the standard way.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Problem with CellTextPaint Event. Not painting correctly
PostPosted: Mon May 27, 2013 3:36 pm 
Offline
User avatar

Joined: Sun Jan 25, 2009 5:11 pm
Posts: 576
Location: Guatemala, Central America
Oh (insert your favorite Deity here) !!!

Thanks for pointing that out. I´ll go to my room and write "Column" 10,000 times.

Thanks!

_________________
Future RS guru.
Ride the world!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group