Hi there,
I'm struggling to understand exactly how list markers such as bullets work. I've been looking at the BulletsAndNumbering demo, and in the code below, it seems that the bullet is created using the Symbol font and charset. I obviously want to avoid this, because these are not Unicode. I can obviously choose a Unicode font here, but I don't see where I could set the actual character itself which is used as the bullet. I'd like to be able to set a series of Unicode characters as bullets in my list styles -- for example these:
u2022 (bullet)
u2023 (triangular bullet)
u25c6 (black diamond)
u25c8 (white diamond)
u2043 (hyphen bullet)
u2219 (bullet operator)
u25d8 (inverse bullet)
u25e6 (white bullet)
Using these Unicode characters, I can ensure that my documents stay compliant, and take advantage of a range of different bullet styles without using images. But I don't see how to choose the character I want for my bullet. Can this be done? If not, how does the TRichView choose its character?
CODE FROM DEMO:
function TForm1.CreateBullets: Integer;
var ListStyle: TRVListInfo;
begin
// 1. Creating desired list style
ListStyle := TRVListInfo.Create(nil);
with ListStyle.Levels.Add do begin
ListType := rvlstBullet;
Font.Name := 'Symbol';
{$IFDEF RICHVIEWCBDEF3}
Font.Charset := SYMBOL_CHARSET;
{$ENDIF}
Font.Size := 12;
FirstIndent := 0;
LeftIndent := 24;
end;
// 2. Searching for existing style with these properties. Creating it, if not found
Result := RVStyle1.ListStyles.FindSuchStyle(ListStyle, True);
ListStyle.Free;
end;
Cheers,
Martin
Setting Unicode list markers
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm