* * *

Author Topic: BringToFront in Form (IDE Lazarus)  (Read 3003 times)

Robson

  • New member
  • *
  • Posts: 47
BringToFront in Form (IDE Lazarus)
« on: January 19, 2011, 04:04:12 pm »
how do I leave the mainform (lazarus ide) in front of the code editor?

(starting lazarus)

garlar27

  • Sr. Member
  • ****
  • Posts: 297
Re: BringToFront in Form (IDE Lazarus)
« Reply #1 on: January 19, 2011, 04:29:18 pm »
If you are working on Linux with Gnome: you can right click in the window's caption bar and check "Alway visible".

I don't know a different way nor within Lazarus configuration.

Robson

  • New member
  • *
  • Posts: 47
Re: BringToFront in Form (IDE Lazarus)
« Reply #2 on: January 19, 2011, 04:37:38 pm »
on source code of lazarus, not in application

(Lazarus to start with the form window above the window source code)

up
« Last Edit: January 19, 2011, 04:46:32 pm by Robson »

FabienWang

  • Sr. Member
  • ****
  • Posts: 424
  • Laz Laz Laz
    • The open source man
Re: BringToFront in Form (IDE Lazarus)
« Reply #3 on: January 19, 2011, 10:04:15 pm »
F12 to show the design of a TForm or if you're in the Design, to show the code.

Try also Shift+F12 or Shift+F11
FabienWang is using Arch Linux.
Projects: CPickSniff, OpenGrabby, LazPaint

Robson

  • New member
  • *
  • Posts: 47
Re: BringToFront in Form (IDE Lazarus)
« Reply #4 on: January 19, 2011, 10:26:34 pm »
F12 to show the design of a TForm or if you're in the Design, to show the code.

Try also Shift+F12 or Shift+F11

Friend, I am referring to the Lazarus Project (compile yourself). This is not a new build project.

Text in portuguese - Brazil:
Não sei se a tradução do "Google Traslator" está saindo correto. Se alguém aqui entende o idioma português e puder traduzir eu agradeço.

O problema não é o form de um novo projeto. Eu quero mudar os fontes do próprio Lazarus para que o MainForm (do Lazarus) inicie a frente do "Editor de Código" quando o Lazarus é iniciado, como no Delphi. Do jeito que está, toda vez que inicia o Lazarus, o form fica detrás do Editor de código. Eu quero que fique na frente.
Estou editando a unit main.pp do Lazarus, e depois reconstruindo o próprio Lazarus. Tentei traduzir da melhor maneira, mas o pessoal tá pensando que estou falando de um novo projeto, não é isso não!!!!!!!!!

Thanks

typo

  • Hero Member
  • *****
  • Posts: 1368
Re: BringToFront in Form (IDE Lazarus)
« Reply #5 on: January 19, 2011, 10:36:38 pm »
Robson says that he refers to the Form Editor of the IDE. He wants the Form Editor of the IDE to start in front of (overlapping) the Code Editor, like in Delphi, and he is editing the file Main.pp of Lazarus Sources to reach that.

So he needs your help.

@Robson
Você poderia tentar uma "feature request" no BugTracker ( http://bugs.freepascal.org/view_all_bug_page.php?project_id=1 ).
« Last Edit: January 19, 2011, 11:03:59 pm by typo »

Martin_fr

  • Hero Member
  • *****
  • Posts: 1218
Re: BringToFront in Form (IDE Lazarus)
« Reply #6 on: January 19, 2011, 11:09:21 pm »
Ok, so I understand the following:
@Robson

- You want to edit the main.pp file of the Lazarus IDE.
- You want that when the IDE starts OR if a projetc is opened the design form is brought to the foreground.

Once the project is open, and you work with it then no change is required. If you work on the project, and click source-edit, then the design form can be hidden (or half hidden) behind it)?

What if you open a project, that has many units with design forms?
- Bring to front the design form of the current unit, do not care about the others?
- IF more than one source-edit window, bring to front the design form of the active unit of the active source-window only
- IF more than one source-edit window, bring to front the design form of the active unit of *EACH* source-window?
- Bring to front all design forms?


I do not know for sure where exactly to place the code. I would have to search myself.

But here are a few methods (found in main.pp) which may prove a good starting point.

DoOpenProjectFile => I expect you need to add your code at the end of this procedure

DoShowDesignerFormOfCurrentSrc => well that should at least show one...


If you need more than one designer form to be brought to front, look at the code of DoShowDesignerFormOfCurrentSrc
you can probably copy it, and iterate through the units (or source-editors) as you need....


Robson

  • New member
  • *
  • Posts: 47
Re: BringToFront in Form (IDE Lazarus)
« Reply #7 on: January 19, 2011, 11:32:23 pm »
Hi Martin_fr.

(I use Linux)

My English is bad (translated by Google Translator)

I used this in several ways (DoShowDesignerFormOfCurrentSrc) but gave no effect.

main.pp

---------------------------
function TMainIDE.CreateNewForm(NewUnitInfo: TUnitInfo;
  AncestorType: TPersistentClass; ResourceCode: TCodeBuffer;
  UseCreateFormStatements, DisableAutoSize: Boolean): TModalResult;
-------------------------

AND

-----------------------------------
function TMainIDE.DoNewFile(NewFileDescriptor: TProjectFileDescriptor;
  var NewFilename: string; const NewSource: string;
  NewFlags: TNewFlags; NewOwner: TObject): TModalResult;
------------------------------------


I think it has something to do:

----------------------------------
    // show form and select form
    if NewUnitInfo.Component<>nil then begin
      // show form
      DoShowDesignerFormOfCurrentSrc;
    end else begin
      FDisplayState:= dsSource;
    end;
  end else begin
    // do not open in editor
  end;
------------------------------------

I done a lot but no solution

Martin_fr

  • Hero Member
  • *****
  • Posts: 1218
Re: BringToFront in Form (IDE Lazarus)
« Reply #8 on: January 20, 2011, 12:07:04 am »
Well it's a long time since I last looked at mai, and even then not at this part....

Best is to run it in the debugger, and see what happens.

Also try to find the method called when you press F12, and see what happens there....

Sorry, I don't have the time to debug it myself at current. So i can't give you any more help than this....

Maybe try the mailing-list too, maybe you get some additional people to read it....

2011summit

  • Guest
Re: BringToFront in Form (IDE Lazarus)
« Reply #9 on: February 07, 2011, 06:53:42 am »
Shift+F12 or Shift+F11

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads