Utilisateur anonyme
-
11 févr. 2008 à 10:25
Utilisateur anonyme -
12 févr. 2008 à 09:00
Salut à tous,
Ca commence à etre de notoriété internationale : Francky et le Design, ca fait deux .
Alors quitte à faire un truc autant faire un truc sympas : Et c'est là ou j'ai besoin de vous (Il y a un de ces silences tout à coup : j'entends meme les quenottes de Cari ).
J'ai fais un petit composant : une sorte de TreeView ultra élémentaire qui utilise des Panels.
Procedure TBrowser.Add_SoundFont(Value:String);
Begin
SetLength(fSoundFontList,High(fSoundFontList)+2);
With fSoundFontList[High(fSoundFontList)] Do
Begin
FileName:=Value;
Panel:=TPanel.Create(Self);
Panel.Parent:=Self;
Panel.OnClick:=SoundFontsOnClick;
Panel.Tag:=High(fSoundFontList);
Actived:=False;
Font.Color:=Clwhite;
Panel.Caption:=ExtractFileName(FileName);
End;
Self.Invalidate;
End;
Procedure TBrowser.Add_Asio(Value:String);
Begin
SetLength(fAsioList,High(fAsioList)+2);
With fAsioList[High(fAsioList)] Do
Begin
FileName:=Value;
Panel:=TPanel.Create(Self);
Panel.Parent:=Self;
Panel.OnClick:=AsiosOnClick;
Panel.Tag:=High(fAsioList);
Actived:=False;
Font.Color:=Clwhite;
Panel.Caption:=ExtractFileName(FileName);
End;
Self.Invalidate;
End;
Procedure TBrowser.InstrumentsOnClick(Sender:TObject);
Var
Number,Index:Cardinal;
Begin
Number:=0;
If (Sender is TPanel) Then
Number:=(Sender As TPanel).Tag;
For Index:=0 To 127 Do
fInstrumentList[Index].Actived:=False;
fInstrumentList[Number].Actived:=True;
Self.Invalidate;
End;
Procedure TBrowser.SoundFontsOnClick(Sender:TObject);
Var
Number,Index:Cardinal;
Begin
Number:=0;
If (Sender is TPanel) Then
Number:=(Sender As TPanel).Tag;
For Index:=Low(fSoundFontList) To High(fSoundFontList) Do
fSoundFontList[Index].Actived:=False;
fSoundFontList[Number].Actived:=True;
Self.Invalidate;
End;
Procedure TBrowser.AsiosOnClick(Sender:TObject);
Var
Number,Index:Cardinal;
Begin
Number:=0;
If (Sender is TPanel) Then
Number:=(Sender As TPanel).Tag;
For Index:=Low(fAsioList) To High(fAsioList) Do
fAsioList[Index].Actived:=False;
fAsioList[Number].Actived:=True;
Self.Invalidate;
End;
Procedure TBrowser.SetInstrumentPopupMenu(Value:TPopupMenu);
Begin
fInstrumentPopupMenu:=Value;
Self.Invalidate;
End;
Procedure TBrowser.SetSoundFontPopupMenu(Value:TPopupMenu);
Begin
fSoundFontPopupMenu:=Value;
Self.Invalidate;
End;
Procedure TBrowser.SetAsioPopupMenu(Value:TPopupMenu);
Begin
fAsioPopupMenu:=Value;
Self.Invalidate;
End;
Procedure TBrowser.Paint;
Var
Index, IndexTop:Cardinal;
Begin
Self.Color:=Self.fColorBackGround;
IndexTop:=0;
With fInstrumentPanel Do
Begin
Width:=Self.Width-2;
Height:=30;
Top:=IndexTop*32;
Left:=0;
Color:=Self.fColorPanel;
Caption:='INSTRUMENT';
End;
For Index:=0 To 127 Do
With fInstrumentList[Index] Do
Begin
Panel.Width:=Round(Self.Width*0.90)-2;
Panel.Height:=30;
Panel.Top:=32*IndexTop+32;
Panel.Left:=Round(Self.Width*0.1);
If Not Actived Then Panel.Color:=Self.fColorPanel Else
Panel.Color:=Self.fSelectColor;
Panel.Visible:=Self.fInstrumentsVisible;
If Panel.Visible Then Inc(IndexTop);
if Assigned(fInstrumentPopupMenu) Then Panel.PopupMenu:=fInstrumentPopupMenu;
End;
With fSoundFontPanel Do
Begin
Width:=Self.Width-2;
Height:=30;
Top:=32*IndexTop+32;
Left:=0;
Color:=Self.fColorPanel;
Caption:='SOUNDFONT';
Inc(IndexTop);
End;
If High(fSoundFontList)>-1 Then
For Index:=Low(fSoundFontList) To High(fSoundFontList) Do
With fSoundFontList[Index] Do
Begin
Panel.Width:=Round(Self.Width*0.90)-2;
Panel.Height:=30;
Panel.Top:=32*IndexTop+32;
Panel.Left:=Round(Self.Width*0.1);
If Not Actived Then Panel.Color:=Self.fColorPanel Else
Panel.Color:=Self.fSelectColor;
Panel.Visible:=Self.fSoundFontsVisible;
If Panel.Visible Then Inc(IndexTop);
if Assigned(fSoundFontPopupMenu) Then Panel.PopupMenu:=fSoundFontPopupMenu;
End;
With fAsioPanel Do
Begin
Inc(IndexTop);
Width:=Self.Width-2;
Height:=30;
Top:=IndexTop*32;
Left:=0;
Color:=Self.fColorPanel;
Caption:='ASIO';
End;
If High(fAsioList)>-1 Then
For Index:=Low(fAsioList) To High(fAsioList) Do
With fAsioList[Index] Do
Begin
Panel.Width:=Round(Self.Width*0.90)-2;
Panel.Height:=30;
Panel.Top:=32*IndexTop+32;
Panel.Left:=Round(Self.Width*0.1);
If Not Actived Then Panel.Color:=Self.fColorPanel Else
Panel.Color:=Self.fSelectColor;
Panel.Visible:=Self.fAsiosVisible;
If Panel.Visible Then Inc(IndexTop);
if Assigned(fAsioPopupMenu) Then Panel.PopupMenu:=fAsioPopupMenu;
End;
Self.Height:=(IndexTop+1)*32;
End;
destructor TBrowser.Destroy;
Var
Index:Cardinal;
begin
fInstrumentPanel.Free;
fSoundFontPanel.Free;
fASioPanel.Free;
If High(fSoundFontList)>-1 Then
For Index:=0 To High(fSoundFontList) Do Self.fSoundFontList[Index].Panel.Free;
If High(fAsioList)>-1 Then
For Index:=0 To High(fAsioList) Do Self.fAsioList[Index].Panel.Free;
Finalize(fSoundFontList);
Finalize(fAsioList);
inherited;
end;
end.
Je voudrais savoir ce que vous en pensez et surtout quelles fonctionnalités je pourrais ajouter, quel effet de Design apporter pour embéllir la chose ect ect.
Ben oué c'est pratique ce machin mais il est pas tres beau.
Merci à vous
Ps : Je m'associe à la cause de Delphiproglien (Ame sensible s'abstenir).
Si vous n'avez pas reussit à voir cette video en entière : Merci de participer à la pétition par mail PETA2@peta.org et n'hésitez pas à en faire part.Si on peut faire cesser le dépecage de chiens et de chats vivants, en Chine c'est maintenant ou jamais : Ca va etre les jeux olympiques. Ces animaux comptent sur vous
cs_cantador
Messages postés4720Date d'inscriptiondimanche 26 février 2006StatutModérateurDernière intervention31 juillet 202113 11 févr. 2008 à 22:49
j'ai installé le compo !
bon, déjà :
- mettre un bel icone au compo
- revoir les couleurs (mettre un nuancier de couleurs) sur la fenêtre
(car pas beau le noir..)
- faire un effet visuel au passage de la souris sur les instruments (ou la sélection en générale)
- prévoir un évènement OnClic sur la sélection avec un petit effet sonore (correspondant à l'instrument)
- gérer un ascenseur car la liste est bcp trop longue
voilà pour lé début..
et bien sûr, j'ai signé la pétition..
Car même si on ne peut porter de jugement sur les coutumes des autres pays
(sinon nous les taureaux etc..)
on ne peut accepter de dépecer un animal vivant.
Et je rejoins ce que tu as dis : Nul jugement est porté sur ce pays et ses habitants, mais dépecer un animal et le laissez mourir est un acte barbare et donc non acceptable.