Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

glow or differentiate a particular word in a text line

Status
Not open for further replies.

shanmugham

Programmer
Jun 19, 2001
71
IN
Dear friends

i am using vb6, access 97, ADO & msflexgrid

displaying lines in grid lines

using this following commands

sstring is a text (approx 500 chrs)

phrase = sString
blankposition = InStr(1, phrase, vbCrLf)
While blankposition <> 0
nextword = Left$(phrase, blankposition - 1)
str1 = nextword)
gcfc.TextMatrix(lpcount, 3) = str1
gcfc.Rows = gcfc.Rows + 1
lpcount = lpcount + 1
phrase = Right$(phrase, Len(phrase) - blankposition)
blankposition = InStr(1, phrase, vbCrLf)
Wend

str1 = phrase
gcfc.TextMatrix(lpcount, 3) = str1
gcfc.Rows = gcfc.Rows + 1
lpcount = lpcount + 1

I WANT TO GLOW A PARTICULAR WORD IN A LINE OR DIFFERENTIATE A PARTICULAR WORD IN A LINE

HOW TO DO THIS

thanks in advance

SHAN
 
In general, Ms. Controls (with the exception of the rtfText control) do not provide the capability to apply different properties to substrings within the specific instantation of the control (or for multi-part controls, the specific part of the control). While I am not certain of the various grid controls, I believe this is true for the MS supplied ones and at least MOST of the third party ones as well. To achieve some 'effect' similar to this, you might -if you are QUITE determined- try to make a boarderless text box and position it over the desired 'word' and manipulate it's content and properties to APPEAR to be what ever you want. A &quot;similar&quot; technique is shown in some tutorial / third party text to provide an 'editable' cell in an otherwise uneditable grid. I have also seen a combo box used in this manner - however both of these involoved covering the entire CELL of the grid with the alternate control, so covering a specific word within a cell would be a bit more in setting the position. Further, you need to track any possible scrolling of the grid and shadow this with the superimposed control.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top