Hi All.
I'm a new user of Unigui (but a seasoned Delphi developer) and I have some problems with a form (MainForm) where I put, design time a scrollbox and, after, create runtime and put inside the scrollbox, a series of panels, top aligned, with a simple frame (3 labels and one button), client aligned, inside each panel.
This, basically, is the code I use:
procedure TMainForm.AggiungiPanACarrello(aindex: integer);
var
aPnl: TUniPanel;
aFrame: TfrmCarrelloList;
begin
// First I create the UniPanel...
aPnl := TUniPanel.Create(self);
aPnl.Parent := UniScrollBox1;
aPnl.Name := 'pnlCarrello' + aindex.tostring;
aPnl.Align := TAlign.alTop;
aPnl.Height := 92;
aPnl.Visible := TRUE;
aPnl.Tag := aindex - 1;
aPnl.OnClick := TestPanelClick;
// ...and after the UniFrame, inside it
aFrame := TfrmCarrelloList.Create(self);
aFrame.Parent := aPnl;
aFrame.Name := 'frmPnlCarrello' + aindex.tostring;
aFrame.Align := alClient;
aFrame.btnEliminaCarrello.Tag := aindex - 1;
aFrame.btnEliminaCarrello.OnClick := TestButtonClick;
end;
Panels and the connected frames seem to be created and rendered without problems on the scrollbox but..
Main problem is some (weird ?) behaviors with the mouse, first of all when I click on the btnEliminaCarrello tunibutton I never get what is normal with a Delphi desktop application, i.e. is only the button onclick event method that is called: 1) in one little test project I see always fired only the panel onclick event (also if I put panel+frame not into the scrollbox but simply top aligned into the form), 2) and in the real project both methods (panel+button) are called in sequence, though I clicked on button only...
I stop here (i have another strange problem with mouse, but one thing at a time ) : here I'm a newbie so maybe I'm missing something really important for unigui frames, or unigui (events?) at all, and I hope that someone can help.
Thanks a lot.
Marco
p.s. sorry, if you can tell me which is a pratical way to add a screenshoot to this forum posts I can show what I see on my browser