|
__property Graphics::TFont* GGPercentFont = {read=FTextFont, write=SetFont, stored=true }; //IsFontStored};
stored= <-- 이 놈을 true로 하니까? *.dfm 파일에
GGPercentFont.Charset = DEFAULT_CHARSET
GGPercentFont.Color = clWindowText
GGPercentFont.Height = -32
GGPercentFont.Name = 'MS Sans Serif'
GGPercentFont.Style = []
이런식으로 들어가는 군요... ㅋㅋㅋㅋ
그런데 불러오는 것은 어떻게 해야 하는지....
__fastcall TUserColorGauge::TUserColorGauge(TComponent* Owner)
: TCustomControl(Owner)
{
FTextFont = new Graphics::TFont();
:
:
이렇게 하면 기본 디폴트로 들어가 버리는 데...
이 뒤편에서 자동이던 수동이던 해 주어야 할 것 같은데.....
아시는 분 부탁해요...... ........
박영목 님이 쓰신 글 :
: TextHeight = 13
: object UserColorGauge1: TUserColorGauge
: Left = 40
: Top = 112
: Width = 753
: Height = 121
: GGMaxValue = 100
: GGProgress = 48
: GGForeColor = clGreen
: GGForeTextColor = clWhite
: GGBackColor = 14737632
: end
: object FlashBitBtn1: TFlashBitBtn
: Left = 392
: Top = 344
: Width = 75
: Height = 25
: Caption = 'FlashBitBtn1'
: Font.Charset = DEFAULT_CHARSET
: Font.Color = clRed
: Font.Height = -11
: Font.Name = 'MS Sans Serif'
: Font.Style = []
: ParentFont = False
: TabOrder = 1
: OnClick = FlashBitBtn1Click
: About = 'Eryto Milanski'
: Font2ndColor = 8
: end
: end
:
: void __fastcall TUserColorGauge::SetFont(Graphics::TFont* Value)
: {
: FTextFont->Assign( Value );
: }
:
:
: 컴포넌트를 간단한 것만 만들어 보다가... 이번에 TFont를 사용하는 컴포넌트를 만들게 되었는데
: TUserColorGauge 이런 컴포넌트 만들었습니다. Gauge인데.... 글자 %가 XOR로 나와서 내가 원하는 색으로 나오게 하기 위해
: TCustomControl을 상속받아 만들었습니다. 뭐 동작은 잘 합니다... ㅋㅋㅋ
: 그런데.... Graphics::TFont* FTextFont;에 있는 폰트의 값들이 저장되지 않습니다.
:
: 위의 폼의 내용을 보면
: GGMaxValue = 100
: GGProgress = 48
: GGForeColor = clGreen
: GGForeTextColor = clWhite
: GGBackColor = 14737632
: 이런 것들은 보이는데..... 그리고 다시 읽어도 값이 잘 들어오고... 실행해도 디자인할 때 지정한 값으로 잘 되는데...
: TFont의 값은 저장되지 않는군요,....
:
: Font.Charset = DEFAULT_CHARSET
: Font.Color = clRed
: Font.Height = -11
: Font.Name = 'MS Sans Serif'
: Font.Style = []
:
: 아래 것과 같이 이런 씩으로 저장되어야 할 것 같은데......
:
: 간단할 것 같은데..... 모르겠음..... 아시는 분 부탁드립니다.
|