Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 06-09-2007
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.142
Poder: 36
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

El caso es que tiene su miga. Resulta que el componente tiene un evento "OnCategoryCollapse" que se dispara cuando se colapsa o expande una categoría. Yo he intentado ahí que cuando una categoría se expanda el resto de colapse (que creo que es lo que necesita el compañero), pero, nada, que no ha habido manera.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita
  #2  
Antiguo 07-09-2007
scriptors scriptors is offline
Registrado
 
Registrado: sep 2007
Posts: 5
Poder: 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
  #3  
Antiguo 15-03-2015
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.142
Poder: 36
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Cita:
Empezado por dec Ver Mensaje
Hola,

El caso es que tiene su miga. Resulta que el componente tiene un evento "OnCategoryCollapse" que se dispara cuando se colapsa o expande una categoría. Yo he intentado ahí que cuando una categoría se expanda el resto de colapse (que creo que es lo que necesita el compañero), pero, nada, que no ha habido manera.
Sin embargo, algo así parece funcionar como se espera:

Código Delphi [-]
procedure TToolsDockForm.CategoryButtonsCategoryCollapase(
 Sender: TObject; const Category: TButtonCategory);
var
  I: Integer;
begin
  CategoryButtons.OnCategoryCollapase := nil;
  for I := 0 to CategoryButtons.Categories.Count - 1 do
  begin
    CategoryButtons.Categories.Items[i].Collapsed :=
     CategoryButtons.Categories.Items[i] <> Category;
  end;
  CategoryButtons.OnCategoryCollapase :=
   CategoryButtonsCategoryCollapase;
end;

__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 01:16:17.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi