Hi Sergy,
I've made some progress with this using the following code:
//Check Unicode status of Question Default Font
IsUnicode := FMain.RVStyleQ.TextStyles[1].Unicode;
for i := 0 to MasterRVTable.RowCount - 1 do
begin
for j := 0 to MasterRVTable.Cells[i,1].ItemCount - 1 do
begin
CurrentItemStyle := MasterRVTable.Cells[i,1].GetItemStyle(j);
if ((CurrentItemStyle > -1) and (CurrentItemStyle <> 1)) then
begin
if FMain.RVStyleQ.TextStyles[CurrentItemStyle].Unicode = IsUnicode then
MasterRVTable.Cells[i,1].GetItem(j).StyleNo := 1
else if UnicodeAlternateNewStyle > 0 then
MasterRVTable.Cells[i,1].GetItem(j).StyleNo := UnicodeAlternateNewStyle
else
begin
FMain.RVStyleQ.TextStyles.Add;
UnicodeAlternateNewStyle := FMain.RVStyleQ.TextStyles.Count - 1;
FMain.RVStyleQ.TextStyles[UnicodeAlternateNewStyle].Assign(FMain.RVStyleQ.TextStyles[1]);
//FMain.RVStyleQ.TextStyles[UnicodeAlternateNewStyle].Charset := DEFAULT_CHARSET;
FMain.RVStyleQ.TextStyles[UnicodeAlternateNewStyle].Unicode := not IsUnicode;
MasterRVTable.Cells[i,1].GetItem(j).StyleNo := UnicodeAlternateNewStyle;
end;
end;
end;
end;
end
But in some instances the line
FMain.RVStyleQ.TextStyles[UnicodeAlternateNewStyle].Unicode := not IsUnicode;
Does not work - are there any other settings that have to be modified in order to produce a 'clone' of a given font type that will work with an arbitrary text item? Again, all I'm trying to do is force 'random' text items to be rendered in a predefined (Unicode) text style.
Continuing Problem with Modifying Table Fonts
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: