Lazarus Object Inspector is inactive lazarus / 10-Designer ---------------------------------------------------------------------- max2 · 2021-12-25 21:47 I was trying an example with which Lazarus comes. But now the Object Inspector is completely inactive and F11 nor F12 work.How can I enable it ? ---------------------------------------------------------------------- JuhaManninen · 2021-12-25 22:06 The CheckBox demo has no .lfm form file. Everything is done by code. Choose a different project. There are plenty of examples with designer forms. ---------------------------------------------------------------------- max2 · 2021-12-25 22:17 Sound like a good advice but doesn't work. ALmost none of the files in the example directory has no .lfm associated with it, please see the attachment. ---------------------------------------------------------------------- dbannon · 2021-12-25 22:49 Have you opened one of the projects there ?  The OI only shows the form  associated with the pas file you have open in the editor. Davo ---------------------------------------------------------------------- Bart · 2021-12-25 22:53 Most of the examples in that folder create their forms in code, except testall.lpi project, so simply open that. Many of the examples in the subdirectories of examples do have forms though. Bart ---------------------------------------------------------------------- max2 · 2021-12-25 23:09 Now after your advice the F12 key works. BUT the Form Environment displays a form without any items which are present after compilation. So how can I open them in Form Environment ? Please see the attachment. ---------------------------------------------------------------------- max2 · 2021-12-25 23:11 another attachment with form ater pressing F12 with no relationship to the compiled one. ---------------------------------------------------------------------- dbannon · 2021-12-26 06:13 OK, in the testall, testall.pp does not have a form associated with it. All it does is call another unit, testallform.pp that does have a form. So, open that other unit and you will see what you expect. Its a bit of a pity that the example project was not saved with the interesting form being opened by default, it would be a lot clearer for new users. So, in TestAll, put the cursor on the word, tesallform on the Uses line, press Alt - UpArrow Davo ---------------------------------------------------------------------- dbannon · 2021-12-26 06:51 Discussion Mode On I don't think I have looked at the Lazarus examples before, having just done so now, I am not convinced I'd refer a beginner to them in the future. Firstly, we start with everything selected and thats 360 projects, mostly demonstrating some relatively advanced techniques. Good example of what they are trying to show but not suitable for beginners IMHO. Do we need a button labeled "beginners projects" ?  That shows a small number of projects that - Open by default with all units loaded.Have a useful readme.txtDon't feature any "look how clever I am" code ? We do have lots of other, beginners content particularly on the wiki, but that "example projects" button is pretty tempting. Davo Discussion mode off ---------------------------------------------------------------------- Martin_fr · 2021-12-26 09:37 1) Getting a form / Testing F12 (or Menu: "View" > "Toggle Form/Unit") Menu: "Project" > "New Project" Then choose: "Application" This will have an empty form. And you can add Buttons, Labels, .... on that form. 2) Form not part of the "single block" one window (Form is not docked) You notice the form is not part of the big single IDE window. There is a package (Menu "Package" > "Install/Uninstall packages") named "DockedFormEditor". - I have not used/tested it - It may be only in Lazarus 2.2 (If you can't find it in 2.0.12, then try download 2.2RC2) - I do not know, if it works ok. I think some people use it with success. Other people said they have problems.   You need to test yourself. If you test "DockedFormEditor", and you see a problem: Ask here, and if the answer is "it is a bug" => then please report it on our bugtracker (search first, if already reported). Remember: It can only be fixed, if someone makes a report. 3) Examples / Example folder They are not made for "first steps in Pascal". Also not for "first steps with the IDE". They are not a tutorial or introduction. 3a) Documentation We know that documentation is not perfect. And that it can be hard to find the correct "help page". We had some help, from some volunteers. (Great efforts, many thanks to those). You can try the following pages to start: - https://wiki.lazarus.freepascal.org/Portal:New_Users - https://wiki.lazarus.freepascal.org/Lazarus_Documentation#The_Lazaru s_User_Guides - https://wiki.lazarus.freepascal.org/Main_Page - Look at entries that start with "Lazarus" https://wiki.lazarus.freepascal.org/Category:Tutorials?from=l - google ---------------------------------------------------------------------- dbannon · 2021-12-26 11:30 Martin,     neither the OP nor I mentioned creating a new project, docking nor the quality of documentation. The remaining issue, suitability of examples, is moot. We all agree that they are not particularly suited to (nor intended for) a beginner. But that is not clear, especially to a beginner. That is the issue. David ---------------------------------------------------------------------- wp · 2021-12-26 11:52 I agree with dbannon that "someone" should rewrite most of the example projects in the top-level "examples" folder in a more conventional way. I am willing to contribute. But there is already the first problem. I will be doing this on Windows - this means the layout will be perfect on Windows. But when a Linux or mac user opens the same project he will see misaligned and overlapping controls - the typical mess of poorly-designed cross-platform programs. To get it right I'd have to use the Anchor Editor - but this is beyond "beginner level" because when the controls on a form are fully anchored they cannot be repositioned with the mouse any more... Beyond that I have problems classifying sample projects for beginners. What is a "beginner"? A well-experienced Lazarus user is certainly no "beginner" in the common sense, but he may be a "beginner" in TAChart when he never used this library. ---------------------------------------------------------------------- dbannon · 2021-12-26 12:26 I suspect we might be overthinking it really, the existing examples (and demos etc) are fine as long as they are not stumbled across by a beginner.  So, a very small handful of projects, 3 to 5 ?. But identified as 'beginner' projects. If the existing 'Examples" dialog included a "beginners" tickbox, then someone can easily tell that the other ones may not be suitable for a beginner. Scaling can certainly be an issue but maybe, given some testing and limiting the scope, we can get away with it. I very happy to help. Can test on Linux, both hi and low dpi. And an old Mac. Davo ---------------------------------------------------------------------- JuhaManninen · 2021-12-26 13:28 The Example Projects GUI needs a revamp. There is an open issue:  https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/35446 and some related issues. I made the GUI a long time ago. It is not good. I tried to copy features from some existing code dealing with example projects. A new GUI should be simplified. Settings like the subdirectories should go into a dedicated pane in the global options window. A ListView should be used now. It was very buggy in some widgetsets back then. If somebody wants to implement it, please do. Add a comment to the issue if you work on it. ---------------------------------------------------------------------- Martin_fr · 2021-12-26 13:31 Quote from: dbannon on December 26, 2021, 12:30:10 pm    neither the OP nor I mentioned creating a new project, docking nor the quality of documentation. The OP had asked about docking in a different thread, and only hours after having gotten an answer, the OP started this thread. I therefore believe they may find the info on the docked designer useful (even if off topic to this thread). The OP experiencing this issues while looking at examples does not give info whether they had or had not tried and succeeded/failed on a new project. Nor if his problem is generic, or only bound to examples. Thus, if I may opine, opening the thread into that direction might be helpful. ---------------------------------------------------------------------- dbannon · 2021-12-29 04:14 Quote from: JuhaManninen on December 26, 2021, 02:28:18 pm https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/35446 While acknowledging that bug report, I don't really think existing GUI is the cause of the current discussion, that's about either informing a new user that are in the wrong place or providing beginner with a small subset of beginner grade examples.  Currently examples are categorized by the directory they live in, we have 'example' and 'examples'. That's not very user friendly and not intuitive. Most don't have a readme so only metadata is project title. So, do we want a quick and easy fix or a full coverage - * redesign the GUI * provide a category system for all examples, maybe in the (compulsory) readme file ? * Copy the deb/rpm installed example to user space when 'chosen' by the user. Thats quite a significant change, I'm not keen to get stared unless there is some indication its the way we really want to go ?? (and probably move this to a new thread ?) Davo ---------------------------------------------------------------------- Martin_fr · 2021-12-29 11:06 There is some work being done on the examples by WP currently. Anyone interested in helping, can contact him on the mail list (maybe he is on the forum too, I do not know). There are several points that may need attention, and/or be kept in mind. - Some examples are "used" within the tests. (Probably just to check, if they compile, but I have not looked further) - There is a Makefile to build "all" examples. On a cursory look, it appears outdated, and not to include "all".    But, if example should be moved, the Makefile needs to be updated for at least those (edit Makefile.fpc, then use fpcmake from current fpc 3.3.1) It appears some examples are older than the designer in the IDE. Hence they create forms in code. (and maybe some newer ones copied that behaviour?). There should be no issue to change those examples to have their form as LFM. If anyone is interested, I guess many examples could showcase a lot more of the component for which they are made (or more examples for each component could be added, if there is too much to be demonstrated.) Ensuring the two points above (tests/makefile) are taken care of => restructuring of the example folder could also take place. Other ideas can be brought forward. ---------------------------------------------------------------------- dbannon · 2021-12-29 22:38 Quote from: Martin_fr on December 29, 2021, 12:06:30 pmThere is some work being done on the examples by WP currently. Anyone interested in helping, can contact him on the mail list (maybe he is on the forum too, I do not know). Oh, he's definitely on the forum ! > Some examples are "used" within the tests. (Probably just to check, if they compile, but I have not looked further) > But, if example should be moved, the Makefile needs to be updated for at least those ... There should be absolutely no need to move or change existing Examples, demos, test.... I was suggesting a keyword be added to the readme files that catagorised the various projects. That would have no effect on existing behaviour. > Ensuring the two points above (tests/makefile) are taken care of => restructuring of the example folder could also take place. I don't see the need, as you note, restructuring would risk bad things happening to at least the tests. I did suggest that we need a way to copy an example project out of read only space, into user space when a user decides to have a play with it, but that would be on a as needed basis. And only for those Lazarus installs that end up read only. If WP is on its case, he will do a far better job than I ! Davo ---------------------------------------------------------------------- Blavatsky · 2023-08-19 06:30 I think I found a FIX Tools>>>Options>>>Environment>>> IDE CoolBar >>> Configure>>>View Menu Commands on top menubar for the following Remove Open Unit Remove Open Form Add Toggle Form/Unit and  shuffle it up under object inspector button. VOIR-LA  keyboard shortcuts: CTRL+F12  View Units SHIFT+F12 View Forms to open Form then it works Also select main menu: View>Toggle Form/Unit