Ver Mensaje Individual
  #9  
Antiguo 29-05-2008
Avatar de movorack
[movorack] movorack is offline
Miguel A. Valero
 
Registrado: feb 2007
Ubicación: Bogotá - Colombia
Posts: 1.346
Reputación: 20
movorack Va camino a la famamovorack Va camino a la fama
ahh por cieto...

El de bicho lo había hecho así...

Código Delphi [-]
function TForm.GetStatusBarPanelClicked(StatusBar : TStatusBar; X, Y: Integer) : Integer;
var i, PanelWidthSum : integer;
begin
  PanelWidthSum := 0;
  for i := 0 to StatusBar.Panels.Count - 1 do
  begin
    if (x >= PanelWidthSum) and (x <= PanelWidthSum+StatusBar.Panels[i].Width) then
    begin
      Result := i;
      exit;
    end else
      Inc(PanelWidthSum, StatusBar.Panels[i].Width);
  end;

  Result := -1;
end;

Hago la salvedad que usando cualquiera de los dos códigos; NO tienes que agregar nada a Uses... El mismo compilador lo hace
__________________
Buena caza y buen remar... http://mivaler.blogspot.com

Última edición por movorack fecha: 29-05-2008 a las 23:44:54.
Responder Con Cita