trichview.com

trichview.support




please look this code,why no effect?


Return to index


Author

Message

user8848

Posted: 05/07/2005 12:50:42


void __fastcall TEditArticleDlg::cmbFontClick(TObject *Sender)

{

        AnsiString FontNameX;


        if(cmbFont->ItemIndex<0)

                FontNameX = cmbFont->Text;

        else

                FontNameX = cmbFont->Items->Strings[cmbFont->ItemIndex];

        if(UpdatingCombos)

                return;

        UpdatingCombos = True;

        cmbFontSize->FontName = FontNameX;

        UpdatingCombos = False;

        if (cmbFont->ItemIndex<0)

                cmbFont->ItemIndex = cmbFont->Items->IndexOf(FontNameX);

        if (cmbFont->ItemIndex<0)

                Beep();

        else

        {

                rvActionFontEx1->UserInterface = False;

                rvActionFontEx1->ValidProperties = TRVFontInfoMainProperties()<<rvfimFontName;

                rvActionFontEx1->Font->Name = FontNameX;

                rvActionFontEx1->Execute();

                rvActionFontEx1->UserInterface = True;

        }

        ArticleEdit->SetFocus();

}

//---------------------------------------------------------------------------

void __fastcall TEditArticleDlg::cmbFontSizeClick(TObject *Sender)

{

        int FontSizeX;

        if (UpdatingCombos)

                return;


        try

        {

                FontSizeX=StrToInt(cmbFontSize->Text);

                rvActionFontEx1->UserInterface=false;

                rvActionFontEx1->ValidProperties=TRVFontInfoMainProperties()<<rvfimSize;

                rvActionFontEx1->Font->Size=FontSizeX;

                rvActionFontEx1->Execute();

                rvActionFontEx1->UserInterface=true;

        }

        catch(...)

        {

                Beep();

        }

        ArticleEdit->SetFocus();

}

//---------------

i write this code,but i click cmbfont box,no effect,font no change in rve.


please help me.very very thank you





Powered by ABC Amber Outlook Express Converter