Recent

Author Topic: MainMenu: previously hidden menu item isn't displayed again  (Read 1719 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
MainMenu: previously hidden menu item isn't displayed again
« on: September 14, 2021, 01:46:47 pm »
Hi folks.

I tried to programmatically hide the menu item and then show it again. I have failed. In contrast, the enable property works as expected.

Is that how it should be?

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. begin
  3.   CheckBox1Change(Sender);
  4. end;
  5.  
  6. procedure TForm1.CheckBox1Change(Sender: TObject);
  7. begin
  8.   miMiddle.Visible:= not CheckBox1.Checked;
  9.   mileft.Enabled:= CheckBox1.Checked;
  10. end;
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #1 on: September 14, 2021, 01:47:26 pm »
testcase
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

Zvoni

  • Hero Member
  • *****
  • Posts: 734
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #2 on: September 14, 2021, 01:58:44 pm »
Repaint the form?
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircraft

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #3 on: September 14, 2021, 02:00:53 pm »
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

Seenkao

  • Full Member
  • ***
  • Posts: 248
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #4 on: September 14, 2021, 02:06:49 pm »
В Linux работает.

Yandex translate:
It works on Linux.

Zvoni

  • Hero Member
  • *****
  • Posts: 734
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #5 on: September 14, 2021, 02:15:49 pm »
Works on Win10 Pro 64-Bit
FPC3.2.0/LAZ2.0.12 both 32-Bit
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircraft

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #6 on: September 14, 2021, 02:26:14 pm »
Hmmmm. I'm use trunk fpc/laz.  :o
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

Seenkao

  • Full Member
  • ***
  • Posts: 248
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #7 on: September 14, 2021, 06:44:11 pm »
Удали файл *.lpi и попробуй. Может что в настройках нахимичил? (мне приходится его удалять, для запуска проекта).

yandex translate:
Delete the *.lpi file and try it. Maybe you did something in the settings? (I have to delete it to run the project).

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3965
  • I like bugs.
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #8 on: September 14, 2021, 07:59:38 pm »
Delete the *.lpi file and try it. Maybe you did something in the settings?
The project cannot be opened without an *.lpi file. It is the main project info file and should not affect any GUI menu update issues.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

jamie

  • Hero Member
  • *****
  • Posts: 4911
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #9 on: September 15, 2021, 12:39:28 am »
I can load the project fine using the trunk.

It looks like MDI code that was worked on at some point in recent releases is effecting the issue..

There is code that merges and unmerges main menus from child MDI forms. I believe it is causing problems.

The only true wisdom is knowing you know nothing

Seenkao

  • Full Member
  • ***
  • Posts: 248
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #10 on: September 15, 2021, 11:28:54 pm »
The project cannot be opened without an *.lpi file. It is the main project info file and should not affect any GUI menu update issues.
Я боюсь, вы ужаснётесь, когда узнаете сколько раз я удалял *.lpi файл, для того чтоб запустить проект на: другой машине/другой системе; или из-за какой либо попавшей в проект информации, которая портит проект (очень много ненужного хлама скапливается в файле). Разбираться что изменилось в файле у меня зачастую нет желания. А править запуск проекта дополнительными символами, я не считаю правильным, они нужны лишь в определённых случаях.

Да, я прекрасно понимаю, что для больших проектов, удаление файла *.lpi - не является правильным решением. Потому что зачастую проект приходится заново перенастраивать.

yandex translate:
I'm afraid you will be horrified when you find out how many times I deleted the*. lpi file in order to run the project on: another machine/another system; or because of any information that got into the project that spoils the project (a lot of unnecessary junk accumulates in the file). I often have no desire to understand what has changed in the file. And I don't think it's right to edit the launch of the project with additional symbols, they are needed only in certain cases.

Yes, I understand perfectly well that for large projects, deleting the *.lpi file is not the right solution. Because often the project has to be reconfigured again.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 359
Re: MainMenu: previously hidden menu item isn't displayed again
« Reply #11 on: September 16, 2021, 12:49:39 am »
@Seenkao

Rus: мне кажется не стоит флудить. Как сказали выше, содержимое lpi-файла никак не связано с описанной проблемой.
Eng: I think that the contents of the lpi file have nothing to do with the problem described.

It might be worth creating a ticket in the bug tracker. What do you think of it?
Win10 LTSC x64/Deb 11 amd64/Darwin Cocoa (Big Sur):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018