Autor Beitrag
Jojojoxx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Sa 22.09.07 23:35 
Hallo!

Ich möchte gerne in einer Zelle eines Stringgrids einen Teil des Strings fett schreiben.
Ich weiß, wie man mit dem Ereignis OndrawCell den kompletten Zelleninhalt fett schreiben kann, aber wie kriege ich das für einen Teilstring hin?
Danke euch!
mfg

Jojo
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 22.09.07 23:54 
Dazu musst Du deinen String im OnDrawCell in mehrere Teile zerlegen:
- Zuerst den nicht-Fetten Anfang ausgeben
- Mit TextExtend dessen Breite ermitteln
- Danach den Fetten Teil dahinter ergänzen (dafür Schritt 2)
- Mit TextExtend dessen Breite ermitteln
- Den Rest dahinterschreiben (Dafür Schritte 2 und 4)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: So 23.09.07 00:38 
Hat geklappt!!
Danke!
mfg

Jojo