Hi,
Is it possible to show text in the xBrowse cell with characters inserted into it from another code table
(for example, superscript characters of space or volume. As in Word/Excel) ?
Characters from different code tables
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Characters from different code tables
I can tell you this much.
If the string appears correctly using "?" command, it will appear the same way in XBrowse also.
First, test with
If the string appears correctly using "?" command, it will appear the same way in XBrowse also.
First, test with
Code: Select all | Expand
? cText
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Characters from different code tables
Good.
Is it possible to use different fonts in the same row (not in different rows) of the cell ?
Is it possible to use different fonts in the same row (not in different rows) of the cell ?
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Characters from different code tables
Please give some examples and let us try now.superscript characters of space or volume
Any character can also be expressed in utf8. Then we can concatenate all utf8 characters
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Characters from different code tables
Please first see the functioning of the function
This is an example how to use:
![Image](https://imagizer.imageshack.com/v2/xq70/924/qRscTw.png)
Now you have to use this function to paint text in a cell by defining your own codeblock:
This codeblock is evaluated like this:
Code: Select all | Expand
FW_SayTextHilite( hDC, cText, aRect, oFont, nClrText, nClrBack, aWords )
Code: Select all | Expand
function TestHilite()
local oWnd
local cText := "We always eat dinner together"
local aWords
local oFont, oBold, oItalic
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-22
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-25 BOLD
DEFINE FONT oItalic NAME "TIMES NEW ROMAN" SIZE 0,-25 ITALIC
aWords := { { "ALWAYS", oBold, CLR_HRED, CLR_YELLOW }, ;
{ "DINNER", oItalic, CLR_GREEN, CLR_HGRAY }, ;
{ "TOGETHER", oItalic, CLR_WHITE, CLR_RED } }
DEFINE WINDOW oWnd
oWnd:SetFont( oFont )
oWnd:bPainted := <|hDC|
local aRect := GetClientRect( oWnd:hWnd )
aRect[ 2 ] += 100
FW_SayTextHilite( hDC, cText, aRect, oFont, ;
CLR_BLACK, CLR_WHITE, aWords )
return nil
>
ACTIVATE WINDOW oWnd CENTERED
RELEASE FONTS oFont, oBold, oItalic
return nil
![Image](https://imagizer.imageshack.com/v2/xq70/924/qRscTw.png)
Now you have to use this function to paint text in a cell by defining your own codeblock:
Code: Select all | Expand
oCol:bPaintText
Code: Select all | Expand
Eval( ::bPaintText, Self, hDC, cStrData, oRect:aRect, aColors, lHighLite, lSelected )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India