mIRC Home    About    Download    Register    News    Help

Print Thread
#215281 10/09/09 01:48 PM
Joined: Mar 2008
Posts: 44
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 44
Hi, what does the rich style do in an edit control ?
Is it possible to change the type of font used & the colours ?

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Yes, read an RTF tutorial to learn more. Example:

Code:
dialog test {
  title "Test Dialog"
  size -1 -1 500 500
  edit "Test Edit", 1, 5 5 490 490, multi return rich
}
on *:DIALOG:test:init:0:{
  did -ra $dname 1 {\rtf1\ansi $+ $&
    {\colortbl;\red255\green0\blue0;\red0\green0\blue255;\red255\green255\blue0;} $+ $&
    {\fonttbl\f0\fmodern Arial Black;}\f0\fs24\pard\cf2m\cf1IR\cf3C\par}
}

/dialog -m test test

Joined: Mar 2008
Posts: 44
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 44
Hi Collective, thanks that was quite helpful, (a little tough though having to read the rtf stuff). your example works fine, but am unable to integrate the stuff & get it working in my code properly yet. - before this i was using /filter to load the file contents into the edit control. here is where i am atm..
--------
Thankyou.

Code:
        if (%intrpath) {
          did -ra versions 12 {\rtf1\ansi $+ $&
            {\colortbl;\red255\green0\blue0;} $+ $&
            {\fonttbl\f0\Courier new;}\f0\fs24\pard\cf1 $+ $&
          $eval($qt(%intrpath),2) $+ $chr(125) $+ \par
      } 



Link Copied to Clipboard