trichview.com

trichview.support




Richview and adding a control (radiogroup)


Return to index


Author

Message

pierrebenoit

Posted: 06/10/2003 4:10:19


Hi,

I put on a form a richview (freeware) + radiogroup inside with 3 items and

I'm trying to retrieve the index of the item that is selected... without

any success.

With a form +radiogroup, I use radiogroup1.itemindex to retrieve this integer

and that work well


The code is down (with two radiogroup):


========================================================

unit Unit1;


interface


uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, StdCtrls, ExtCtrls, RVStyle, RVScroll, RichView;


type

  TForm1 = class(TForm)

    RadioGroup1: TRadioGroup;

    Label1: TLabel;

    Button1: TButton;

    RichView1: TRichView;

    RVStyle1: TRVStyle;

    Label2: TLabel;

    Button2: TButton;

    RadioGroup2: TRadioGroup;

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;


var

  Form1: TForm1;


implementation


{$R *.dfm}


procedure TForm1.Button1Click(Sender: TObject);

begin

label1.Caption := intToStr(radiogroup1.itemindex);

end;


procedure TForm1.Button2Click(Sender: TObject);

begin

label1.Caption := intToStr(radiogroup2.itemindex);

end;




end.


==================================================


3 items is put directly in the editor properties and all the parameters are

not changed (default parameters). I'm using D6 perso.


How can I retrieve the index of the radio I select.


Thanks for all.





Powered by ABC Amber Outlook Express Converter