home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR41
/
DFPP02.ZIP
/
LABEL.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-13
|
667b
|
39 lines
// ------------- label.cpp
#include <ctype.h>
#include "label.h"
Label::Label(char *txt, int lf, int tp, int wd, DFWindow *par)
: TextBox(lf, tp, 1, wd ? wd : strlen(txt), par)
{
SetText(txt);
char *ac = strchr(txt, SHORTCUTCHAR);
if (ac != 0)
Control::LatestShortcut = tolower(*(ac+1));
Disable();
}
void Label::CloseWindow()
{
TextBox::CloseWindow();
}
// -------- set the fg/bg colors for the window
void Label::SetColors()
{
if (Parent() != 0) {
SetColor(Parent()->Colors());
shortcutfg = RED;
}
}
void Label::Paint()
{
if (visible)
WriteShortcutLine(0, colors.fg, colors.bg);
}