Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 25-03-2004
garth garth is offline
Registrado
 
Registrado: mar 2004
Posts: 3
Poder: 0
garth Va por buen camino
mostrar porcentaje con CGauge del texto de un Edit

Lo consigo poniendo en el TForm1::Edit1Change esta linea:

CGauge1->AddProgress(atoi(Edit1->Text.c_str()));

pero si pongo 12 en el edit, en la barra de progreso me pone 13, o borro el 13 y pongo 60 y ya me pone el 100%.

A ver si alguien me puede solucionar esto, ke nunca he trabajado con este sample

Gracias
Responder Con Cita
  #2  
Antiguo 26-03-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Poder: 28
jachguate Va por buen camino
Es que estas usando AddProggress.... y este método suma el valor que le pongas al progreso actual... mejor usá la pripiedad Pos (no recuerdo exactamente si el nombre es ese... pero si no, seguro la reconoces al verla... ).

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita
  #3  
Antiguo 26-03-2004
garth garth is offline
Registrado
 
Registrado: mar 2004
Posts: 3
Poder: 0
garth Va por buen camino
po no veo nada de pos...

no podrias mirar a ver ke funcion es? ademas, si pongo 23 me sale 25 y si pongo 70 me sale 77 (vamos, eso con el addprogress pero de una sola vez :S).aki estan to las funciones publicas:

__fastcall virtual TCGauge(TComponent *AOwner);
void __fastcall AddProgress(Longint Value);
__property Longint PercentDone = {read=GetPercentDone, nodefault};

__published:
__property Align ;
__property Anchors ;
__property Color ;
__property Constraints ;
__property Enabled ;
__property TCGaugeKind Kind = {read=FKind, write=SeTCGaugeKind, default=1};
__property Boolean ShowText = {read=FShowText, write=SetShowText, default=1};
__property Font ;
__property TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
__property TColor ForeColor = {read=FForeColor, write=SetForeColor, default=0};
__property TColor BackColor = {read=FBackColor, write=SetBackColor, default=16777215};
__property Longint MinValue = {read=FMinValue, write=SetMinValue, default=0};
__property Longint MaxValue = {read=FMaxValue, write=SetMaxValue, default=100};
__property ParentColor ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property Longint Progress = {read=FCurValue, write=SetProgress, nodefault};
__property ShowHint ;
__property Visible ;

gracias.
Responder Con Cita
  #4  
Antiguo 26-03-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 29
Lepe Va por buen camino
no podrias mirar a ver ke funcion es? ademas, si pongo 23 me sale 25 y si pongo 70 me sale 77 (vamos, eso con el addprogress pero de una sola vez :S).aki estan to las funciones publicas:
Código:
 
 __fastcall virtual TCGauge(TComponent *AOwner);
 void __fastcall AddProgress(Longint Value);
 __property Longint PercentDone = {read=GetPercentDone, nodefault};
 
__published:
 __property Align ;
 __property Anchors ;
 __property Color ;
 __property Constraints ;
 __property Enabled ;
 __property TCGaugeKind Kind = {read=FKind, write=SeTCGaugeKind, default=1};
 __property Boolean ShowText = {read=FShowText, write=SetShowText, default=1};
 __property Font ;
 __property TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
 __property TColor ForeColor = {read=FForeColor, write=SetForeColor, default=0};
 __property TColor BackColor = {read=FBackColor, write=SetBackColor, default=16777215};
 __property Longint MinValue = {read=FMinValue, write=SetMinValue, default=0};
 __property Longint MaxValue = {read=FMaxValue, write=SetMaxValue, default=100};
 __property ParentColor ;
 __property ParentFont ;
 __property ParentShowHint ;
 __property PopupMenu ;
 __property Longint Progress = {read=FCurValue, write=SetProgress, nodefault};
 __property ShowHint ;
 __property Visible ;
gracias.

de nada
Responder Con Cita
Respuesta



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 20:03:04.


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