Author: Jonas Bilinkevicius
Does anyone know of a way to change the scroll bars in the RichEdit to obtain the
flat look?
Answer:
Start with this one and do not forget to put CommCtrl in your uses clause:
1 procedure TForm1.FormCreate(Sender: TObject);
2 var3 XVerScrollInfo, XHorScrollInfo: TScrollInfo;
4 begin5 InitializeFlatSB(RichEdit1.Handle);
6 GetScrollInfo(RichEdit1.Handle, SB_VERT, XVerScrollInfo);
7 GetScrollInfo(RichEdit1.Handle, SB_HORZ, XHorScrollInfo);
8 FlatSB_SetScrollProp(RichEdit1.Handle, WSB_PROP_VSTYLE, FSB_ENCARTA_MODE, True);
9 FlatSB_SetScrollProp(RichEdit1.Handle, WSB_PROP_HSTYLE, FSB_ENCARTA_MODE, True);
10 end;