Search the Community
Showing results for tags 'header'.
Found 3 results
HI. I have this code and works ok (on application declaration unit) FHeader := TW3HeaderControl.Create(Display); FHeader.SetBounds(5, -10, 100, 40); FHeader.Caption := 'xxxxxx'; FHeader.BackButton.Caption := '←'; //arrow left FHeader.NextButton.Caption := '☰'; //hamburger menu FHeader.NextButton.OnClick := createMenu; ... procedure TApplication.CreateMenu(Sender: TObject); begin FfrmMenu := TfrmMenu.Create(Application.Display.View); FfrmMenu.Name := 'MainMenu'; Application.RegisterFormInstance(FfrmMenu, true); Application.GotoForm('MainMenu', feFromRight); Application.GotoForm('MainMenu', feFromRight); end; (the menu appears when i press next button, but the header is visible on login form .) And this one that does not FHeader := TW3HeaderControl.Create(Display); FHeader.SetBounds(5, -10, 100, 40); FHeader.Caption := 'xxxxxx'; FHeader.BackButton.Caption := '←'; //arrow left FHeader.NextButton.Caption := '☰'; //hamburger menu FHeader.NextButton.OnClick := OpenMenu; ... createMenu(Application) procedure TApplication.CreateMenu(Sender: TObject); begin if FfrmMenu = nil then begin ShowMessage('Control 0'); //show message FfrmMenu := TfrmMenu.Create(Application.Display.View); FfrmMenu.Name := 'MainMenu'; Application.RegisterFormInstance(FfrmMenu, true); end; end; procedure TApplication.OpenMenu; begin ShowMessage('Control 1'); //show message Application.GotoForm('MainMenu', feFromRight); //don't show form menu ShowMessage('Control 2'); //show message end; The objective is to open a login form with the header not enabled and, if the password is correct, enable the header and see a menu when clicking on the next button. I do not see what I'm doing wrong