Ver Mensaje Individual
  #5  
Antiguo 07-09-2007
scriptors scriptors is offline
Registrado
 
Registrado: sep 2007
Posts: 5
Reputación: 0
scriptors Va por buen camino
thanks for replay,
I'm Italian so it's easy to 'read' your language but difficult to write

I read all founded page with google or yahoo about TCategoryButtons without found nothing functional

I know:

Código:
 
procedure Form1.SelectCategoryCollapase(Sender: TObject;
  const Category: TButtonCategory);
begin
...
end;
but after too many test i haven't realized one working routine.

The BEST strange things are:
if I make one routine and write, at beginnig, one

Showmessage( {variable.get} ); // just for example
I have one working procedure, if I delete the 'ShowMessage' I have one NOT working procedure and system error

I beginning to think this component have some BUG ... or I have more BUG of it

_________________________

Because I found less example about this component i post some functional example I have found/discovered/realized:

Create Items into Group (I use it into While .. do routine):

var
aButton : TButtonItem;
NPNL : integer;

...
abutton := select.categories[1].items.add; // add button item into TCategoryButtons (called 'select') into categoryGroup n.1
abutton.Caption := 'some text' ; // add TextName of button item
select.Categories[1].items[NPNL].onclick := Gruppo1; // add OnClick property (procedure: Gruppo1) - NPNL is one integer and are incremented into While cycle or somethings you like
------------------

procedure Form1.Gruppo1(Sender: TObject);
var
Pulsante: TButtonItem;
Riga : integer;
begin
...
Riga := 0;
Pulsante := Select.SelectedItem; // select are Name of TCategoryButtons
Riga := Pulsante.Index; // Riga are Item Clicked
...

_________________________
Responder Con Cita