mIRC Home    About    Download    Register    News    Help

Print Thread
"rich" -style in dialogs #215281 10/09/09 01:48 PM
Joined: Mar 2008
Posts: 44
N
Nightstorm Offline OP
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 ?

Re: "rich" -style in dialogs [Re: Nightstorm] #215284 10/09/09 06:22 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
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

Re: "rich" -style in dialogs [Re: Collective] #215334 12/09/09 08:51 AM
Joined: Mar 2008
Posts: 44
N
Nightstorm Offline OP
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
      }