Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On Sun, 10 Apr 2011 23:29:15 +0300, ik ido...@gmail.com wrote: Please see answer inline. On Sun, Apr 10, 2011 at 22:08, Bo Berglund bo.bergl...@gmail.com wrote: I was using Lazarus to create a console application for parsing out data from a network speed test program. When doing this I had to look at files from the test application and then code back and forth. But it was very annoying that it seems not to be possible to minimize Lazarus and then clicking the Lazarus icon on the task bar to bring it all back up. There are a whole bunch of buttons on the tsak bar all havingf the Lazarus icon and when I click them I only get a single window of the IDE avisible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? Compare to Delphi7 where there is a single minimize to use to get rid of all Delphi windows and a single Delphi task bnar button to restore *all* buttons. You can tell Lazarus to display one button only in the Lazarus IDE options. The default are multi windows, but you can change it for single button. Could you tell me exactly which config window/setting it is? I cannot find anything when I look... You can also use docking manager that you can install and make Lazarus support docking. I don't want to use docked windows It is like Visual Studio, right? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Console application does not close cleanly!
On Sun, 10 Apr 2011 23:32:57 +0300, ik ido...@gmail.com wrote: Is this specific to Ubuntu Linux or is it some error in my coding that causes this? [blush]... I made a silly mistake of creating and freeing the same object twice (in constructor/destructor plus in a method)! Of course freeing twice is not such a good idea -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
(...) When doing this I had to look at files from the test application and then code back and forth. But it was very annoying that it seems not to be possible to minimize Lazarus and then clicking the Lazarus icon on the task bar to bring it all back up. There are a whole bunch of buttons on the task bar all having the Lazarus icon and when I click them I only get a single window of the IDE visible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? These are the default behaviors of the platforms. Unfortunately there's no Window Manager for Linux/X that can automatically group windows of a process :-( Compare to Delphi7 where there is a single minimize to use to get rid of all Delphi windows and a single Delphi task bar button to restore *all* buttons. You can tell Lazarus to display one button only in the Lazarus IDE options. The default are multi windows, but you can change it for single button. This is currently your best shot (other than the dock, maybe), it's a hack that we implemented in Lazarus. Unfortunately it doesn't work perfectly, some windows are not hidden/restored correctly. Also, re-activating the application without minimizing doesn't restore windows (none but the main one). You can also use docking manager that you can install and make Lazarus support docking. http://wiki.freepascal.org/Docking Best regards, Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On Sunday 10 of April 2011 21:08:30 Bo Berglund wrote: Maybe there is a setting somewhere to handle this? If so please tell me where it is. Tools-Options-Environment-Window- [x] Show single button in TaskBar zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Metafile support
Hello, I added Pen and Brush information to all generic data structures in fpvectorial in the lazarus-ccr, please take a look. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] AnchorDocking resize priority
Hi All, Possible to make a priority for resizing docked windows? To the extent possible when resizing the form, the changes occurred due to a single window, instead of all proportion to? -- Best regards, Andrey mailto:zam...@gmail.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Trouble building IDE using lazbuild
Hi list, since some time (IIRC since making the lcl a usual package) I get an error when building the IDE using lazbuild. Errormessage: ... Compiling lazhelpintf.pas Compiling lazlinkedlist.pas Compiling lclmemmanager.pas Compiling lclmessageglue.pas Fatal: Can't find unit Messages used by LCLMessageGlue TExternalToolList.Run Exception: /home/ingo/dev/lazarus/lcl/lclmessageglue.pas(1,1) Fatal: Can't find unit Messages used by LCLMessageGlue ERROR: tool reported error I'm using Ubuntu 10.10 64bit with Gnome(GTK+) FPC 2.5.1 r17306 and Lazarus 0.9.31 r30265. The commands I use look like this: svn up make clean all ./lazbuild -B --pcp=~/dev/lazarus/.lazarus --build-ide= The make command and rebuilding the IDE from inside the IDE are running fine. Only lazbuild fails. Also with FPC 2.4.2 and Lazarus 0.9.30 I have no problems. Any hints? -- regards Ingo -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Strange EAccessViolation
Today I have been reported a crash in an application and they sent me the stack trace it captured: 11/04/2011 16:09:11 EAccessViolation Access violation Stack trace: $004EED89 $004EF8BD $0040BF3B $004EEBDC $004ED988 $004E532F $004E644E $00567767 $0050D695 $7E418734 $7E418816 $7E4189CD $7E418A10 $00510E34 $00421DB9 $004221AF $0043B473 Address $004EED89 corresponds to this procedure in control.inc (I marked the line with but I'm not sure the access violation happens there or in the line before). {-- TControl DoMouseUp Event Handler --} procedure TControl.DoMouseUp(var Message: TLMMouse; Button: TMouseButton); var P: TPoint; begin if not (csNoStdEvents in ControlStyle) then with Message do begin if (Button in [mbLeft, mbRight]) and DragManager.IsDragging then begin P := ClientToScreen(Point(XPos, YPos)); DragManager.MouseUp(Button, KeysToShiftState(Keys), P.X, P.Y); Message.Result := 1; end; MouseUp(Button, KeysToShiftState(Keys), XPos, YPos); end; end; The rest of addresses are all in the LCL, leading to this call, starting from $0043B473 which is this procedure in interfacebase.inc: procedure TWidgetSet.AppRun(const ALoop: TApplicationMainLoop); begin if Assigned(ALoop) then ALoop; end; However I have no information for these strange addresses in the middle of the stack: $7E418734 $7E418816 $7E4189CD $7E418A10 Apart from these addresses, everything else doesn't touch my code, so I think that, maybe, it's a bug in the LCL (considering that's quite an old version, Lazarus 0.9.29 r22953 FPC 2.2.4 i386-win32-win32/win64, however it has served me fine in various other projects). What do you think? TIA Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es Tel. +34 935883004 (Ext.133) Fax +34 935883007 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
Leonardo M. Ramé wrote: Hi, I was testing a sample project and found that on Windows, handling of PNGs with transparent backgrounds is working ok, but on Linux it doesn't work as expected. The image is a black line on the top of the image, with a Gaussian Blur applied on Photoshop, then saved to PNG with transparent background. I attached an image showing what I get on Windows vs Linux, also the original image. The current linux-gtk implementation has only a 1 bit alpha Marc -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] UniqueInstance issue
Luiz Americo Pereira Camara ha scritto: On 3/4/2011 08:17, Giuliano Colla wrote: Luiz Americo Pereira Camara ha scritto: On 2/4/2011 15:18, Giuliano Colla wrote: In an application I'm currently developing, meant to run under RHEL5, I needed to ensure that no multiple instances were running, so I installed the UniqueInstance component: http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ please publish a sample project and a stacktrace To avoid attachment length problems, my zipped sandbox folder is available at: http://www.copeca.it/colla/Sandbox.zip where you can find project1 and project2, to help sort out the problems, together with Trace1.txt and Trace2.txt, which are the stack traces for project1 and project2. Project1 is nothing but a form with only a TUniqueInstance component. If the component is enabled at design time, it works perfectly. If the component is not enabled at design time, see Trace1.txt. (stack trace of the first and only instance running) In Project2 I tried to put in one by one all the components of my real application. Apparently the problem arises with the TMemo component, whose presence, together with TUniqueInstance, triggers the access violation (see Trace2.txt, which is the trace of the second instance running). A TMemo issue or a TUiniqueInstance issue? Thanks. I fixed the issue on svn. There's one issue pending that i'm working on it. See comments of http://lazarusroad.blogspot.com/2006/12/only-one-instance.html Thanks, I'll get the svn and try to backport the fix to my Lazarus version. If I come out with a good idea, I'll submit it for the pending issue. If not, I'll patiently wait for someone brighter than me to find the solution... -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On Sun, 10 Apr 2011 23:29:15 +0300, ik ido...@gmail.com wrote: Please see answer inline. On Sun, Apr 10, 2011 at 22:08, Bo Berglund bo.bergl...@gmail.com wrote: I was using Lazarus to create a console application for parsing out data from a network speed test program. When doing this I had to look at files from the test application and then code back and forth. But it was very annoying that it seems not to be possible to minimize Lazarus and then clicking the Lazarus icon on the task bar to bring it all back up. There are a whole bunch of buttons on the tsak bar all havingf the Lazarus icon and when I click them I only get a single window of the IDE avisible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? Compare to Delphi7 where there is a single minimize to use to get rid of all Delphi windows and a single Delphi task bnar button to restore *all* buttons. You can tell Lazarus to display one button only in the Lazarus IDE options. The default are multi windows, but you can change it for single button. Could you tell me exactly which config window/setting it is? I cannot find anything when I look... You can also use docking manager that you can install and make Lazarus support docking. I don't want to use docked windows It is like Visual Studio, right? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Component visibility at design time
patspiper kirjoitti sunnuntai, 10. huhtikuuta 2011 20:56:17: The button will be visible by default. The application would show or hide the button depending on the context. Anyway, my actual modifications to TEditBtn just add the necessary logic so that a descendant that can hide/show the button becomes feasible. I think you mean component TCustomEditButton. Your modification could be used for a filter-edit component I planned to make and use for different list- and treeviews in Lazarus. When empty, the control shows a gray (filter) or (search). When user types something, an erase-button shows up. Clicking the button makes the control empty again. I wanted to draw an erase-button on the right end of the edit control itself, but it may be more difficult. Anyway, if you have modifications for TCustomEditButton which don't break existing code, I think it can be used in LCL. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to convert it to FPC/Lazarus
Hello, I have a Delphi based program that I try to rewrite for Lazarus (The original code is not mine). There is a code there like so: type TTab = (ttOne, ttTwo, ttThree); TTabs = set of TItems; ... procedure DisplayTabs(Display : TTabs); var i:integer; begin Tabs:=Display; for i:=0 to PageControl.PageCount-1 do begin PageControl.Pages[i].TabVisible:= word(Display) and (1 shl i)0; // how to make this work ? end; PageControl.ActivePageIndex:=ord(Display); end; ... I rewrote it for the example here,but that's the same code. How can I make it work in FPC+Lazarus ? Thanks, Ido -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to convert it to FPC/Lazarus
On Tue, 12 Apr 2011, ik wrote: Hello, I have a Delphi based program that I try to rewrite for Lazarus (The original code is not mine). There is a code there like so: type TTab = (ttOne, ttTwo, ttThree); TTabs = set of TItems; ... procedure DisplayTabs(Display : TTabs); var i:integer; begin Tabs:=Display; for i:=0 to PageControl.PageCount-1 do begin PageControl.Pages[i].TabVisible:= word(Display) and (1 shl i)0; // how to make this work ? PageControl.Pages[i].TabVisible:= TTab(I) in Display Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] AnchorDocking resize priority
Andrey M, Zubarev zam...@gmail.com hat am 11. April 2011 um 10:16 geschrieben: Hi All, Possible to make a priority for resizing docked windows? To the extent possible when resizing the form, the changes occurred due to a single window, instead of all proportion to? There is no property for this. You can override the ResetBounds function: DockMaster.ManagerClass:=TMyAnchorDockManager; TMyAnchorDockManager = class(TAnchorDockManager) public procedure ResetBounds(Force: Boolean); override; end; Mattias-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to convert it to FPC/Lazarus
On Tue, Apr 12, 2011 at 16:52, michael.vancann...@wisa.be wrote: On Tue, 12 Apr 2011, ik wrote: Hello, I have a Delphi based program that I try to rewrite for Lazarus (The original code is not mine). There is a code there like so: type TTab = (ttOne, ttTwo, ttThree); TTabs = set of TItems; ... procedure DisplayTabs(Display : TTabs); var i:integer; begin Tabs:=Display; for i:=0 to PageControl.PageCount-1 do begin PageControl.Pages[i].TabVisible:= word(Display) and (1 shl i)0; // how to make this work ? PageControl.Pages[i].TabVisible:= TTab(I) in Display That's more simple :) Thanks. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Ido -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
2011/4/11 Flávio Etrusco flavio.etru...@gmail.com (...) When doing this I had to look at files from the test application and then code back and forth. But it was very annoying that it seems not to be possible to minimize Lazarus and then clicking the Lazarus icon on the task bar to bring it all back up. There are a whole bunch of buttons on the task bar all having the Lazarus icon and when I click them I only get a single window of the IDE visible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? These are the default behaviors of the platforms. Unfortunately there's no Window Manager for Linux/X that can automatically group windows of a process :-( Sure you have. I have it on my KDE (that I do not use it, but it's there), and I'm sure others also have it. Compare to Delphi7 where there is a single minimize to use to get rid of all Delphi windows and a single Delphi task bar button to restore *all* buttons. You can tell Lazarus to display one button only in the Lazarus IDE options. The default are multi windows, but you can change it for single button. This is currently your best shot (other than the dock, maybe), it's a hack that we implemented in Lazarus. Unfortunately it doesn't work perfectly, some windows are not hidden/restored correctly. Also, re-activating the application without minimizing doesn't restore windows (none but the main one). You can also use docking manager that you can install and make Lazarus support docking. http://wiki.freepascal.org/Docking Best regards, Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] UniqueInstance issue
Luiz Americo Pereira Camara ha scritto: On 3/4/2011 08:17, Giuliano Colla wrote: Luiz Americo Pereira Camara ha scritto: On 2/4/2011 15:18, Giuliano Colla wrote: In an application I'm currently developing, meant to run under RHEL5, I needed to ensure that no multiple instances were running, so I installed the UniqueInstance component: http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ please publish a sample project and a stacktrace To avoid attachment length problems, my zipped sandbox folder is available at: http://www.copeca.it/colla/Sandbox.zip where you can find project1 and project2, to help sort out the problems, together with Trace1.txt and Trace2.txt, which are the stack traces for project1 and project2. Project1 is nothing but a form with only a TUniqueInstance component. If the component is enabled at design time, it works perfectly. If the component is not enabled at design time, see Trace1.txt. (stack trace of the first and only instance running) In Project2 I tried to put in one by one all the components of my real application. Apparently the problem arises with the TMemo component, whose presence, together with TUniqueInstance, triggers the access violation (see Trace2.txt, which is the trace of the second instance running). A TMemo issue or a TUiniqueInstance issue? Thanks. I fixed the issue on svn. There's one issue pending that i'm working on it. See comments of http://lazarusroad.blogspot.com/2006/12/only-one-instance.html For your information, the link to svn in the wiki page is broken. After failing, I got the good one from blogspot. Now I'll test ASAP. -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On Tue, Apr 12, 2011 at 1:12 PM, Hans-Peter Diettrich drdiettri...@aol.com wrote: Flávio Etrusco schrieb: There are a whole bunch of buttons on the task bar all having the Lazarus icon and when I click them I only get a single window of the IDE visible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? These are the default behaviors of the platforms. Unfortunately there's no Window Manager for Linux/X that can automatically group windows of a process :-( I've provided a solution long ago, that hides all but the main form when the application is minimized. On restore the hidden forms have to be made visible again, that's all. The current IDE fails to leave intenionally minimized windows minimized, when the main form is restored. There exists no reason why anything but the form visibility has to be changed, in order to hide forms from the taskbar. See examples/dockmanager/ide_demo... BTW, the minimize/restore part is independent from docking. DoDi Sure, I saw it years ago. And yes, it's mainly a political problem, not a technical one. -Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
This is known issue. GTK have no alpha yet but I created set of components which partially solve this problem by using BGRABitmap class, details: http://www.lazarus.freepascal.org/index.php/topic,12411.0.html . Although there is no TImage yet but I can try create it. For TrayIcon on GTK you must rebuild lazarus with -dUseStatusIcon switch. If tray still have no alpha then you must add this 3 lines posted by TrUsTeR: http://www.lazarus.freepascal.org/index.php/topic,6583.0.html After this tray icon works perfect in my case. 2011/4/10 Leonardo M. Ramé l.r...@griensu.com Hi, I was testing a sample project and found that on Windows, handling of PNGs with transparent backgrounds is working ok, but on Linux it doesn't work as expected. The image is a black line on the top of the image, with a Gaussian Blur applied on Photoshop, then saved to PNG with transparent background. I attached an image showing what I get on Windows vs Linux, also the original image. Thanks in advance, -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Component visibility at design time
On 04/11/2011 11:19 PM, Juha (gmail) wrote: patspiper kirjoitti sunnuntai, 10. huhtikuuta 2011 20:56:17: The button will be visible by default. The application would show or hide the button depending on the context. Anyway, my actual modifications to TEditBtn just add the necessary logic so that a descendant that can hide/show the button becomes feasible. I think you mean component TCustomEditButton. Indeed. Your modification could be used for a filter-edit component I planned to make and use for different list- and treeviews in Lazarus. When empty, the control shows a gray (filter) or (search). When user types something, an erase-button shows up. Clicking the button makes the control empty again. I wanted to draw an erase-button on the right end of the edit control itself, but it may be more difficult. Anyway, if you have modifications for TCustomEditButton which don't break existing code, I think it can be used in LCL. I think my modifications suit your exact needs. I'll submit the patch. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
On 2011-04-12 20:18:48 +0200, Krzysztof wrote: So if you want operate on bitmaps and canvas then maybe it is better to read about BGRABitmap and do this same things which i'm doing in my components. This is very interesting class. You can load PNG image to this class and draw wherever you want similar like with canvas (but with alpha). Details: http://wiki.lazarus.freepascal.org/BGRABitmap and few tutorials (with nice effects): http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial This is crossplatform library You are right Krzysztof, in fact, I adapted my code to BGRABitmap and it worked like a charm. Just a note. I miss the LoadFromLazResource method, like TPicture. Do you plan to add this feature?. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
I am not the author of BGRABitmap class but I think it is easy to assign bitmap from resource to BGRABitmap class. You can load image from resource using TResourceStream (there is tutorial on wiki) and then call BGRABitmap.LoadFromStream(MyResourceStream) 2011/4/12 Leonardo M. Ramé l.r...@griensu.com On 2011-04-12 20:18:48 +0200, Krzysztof wrote: So if you want operate on bitmaps and canvas then maybe it is better to read about BGRABitmap and do this same things which i'm doing in my components. This is very interesting class. You can load PNG image to this class and draw wherever you want similar like with canvas (but with alpha). Details: http://wiki.lazarus.freepascal.org/BGRABitmap and few tutorials (with nice effects): http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial This is crossplatform library You are right Krzysztof, in fact, I adapted my code to BGRABitmap and it worked like a charm. Just a note. I miss the LoadFromLazResource method, like TPicture. Do you plan to add this feature?. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
On 2011-04-12 20:36:34 +0200, Krzysztof wrote: I am not the author of BGRABitmap class but I think it is easy to assign bitmap from resource to BGRABitmap class. You can load image from resource using TResourceStream (there is tutorial on wiki) and then call BGRABitmap.LoadFromStream(MyResourceStream) I tried this and got an 'ExceptionException Unknown/Unsupported PCX image type'. The resource contains a PNG image. lRes := TLazarusResourceStream.Create('sombra_top_horiz', 'PNG'); try lRes.Position:= 0; FMyTBGRABitmap.LoadFromStream(lRes); finally lRes.Free; end; Any workaround? -- Leonardo M. Ramé http://leonardorame.blogspot.com A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TImage and PNG (on linux)
On 2011-04-12 16:09:07 -0300, Leonardo M. Ramé wrote: On 2011-04-12 20:36:34 +0200, Krzysztof wrote: I am not the author of BGRABitmap class but I think it is easy to assign bitmap from resource to BGRABitmap class. You can load image from resource using TResourceStream (there is tutorial on wiki) and then call BGRABitmap.LoadFromStream(MyResourceStream) I tried this and got an 'ExceptionException Unknown/Unsupported PCX image type'. The resource contains a PNG image. lRes := TLazarusResourceStream.Create('sombra_top_horiz', 'PNG'); try lRes.Position:= 0; FMyTBGRABitmap.LoadFromStream(lRes); finally lRes.Free; end; Any workaround? I found a solution. To load the stream with a TFPReader, here's the code, for the record: var lResTop: TLazarusResourceStream; lPngReader: TFPReaderPNG; begin inherited Create(TheOwner); FShadowTop := TBGRABitmap.Create; FShadowBottom := TBGRABitmap.Create; lPngReader := TFPReaderPNG.create; lResTop := TLazarusResourceStream.Create('sombra_top_horiz', 'PNG'); try lResTop.Position:= 0; FShadowTop.LoadFromStream(lResTop, lPngReader); finally lResTop.Free; lPngReader.Free; end; -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On Mon, 11 Apr 2011 08:13:31 +0200, zeljko zel...@holobit.net wrote: On Sunday 10 of April 2011 21:08:30 Bo Berglund wrote: Maybe there is a setting somewhere to handle this? If so please tell me where it is. Tools-Options-Environment-Window- [x] Show single button in TaskBar THere are no Options under Tools... I have found this: Environment-Options-Environment-Window Here I have the following checkboxes: []Minimize all on minimize main (checked and disabled) []Hide IDE windows on run []Hide Messages icons Then there is a panel dealing with window positions only. Can't see the one you suggest. The Lazarus Help/About box shows: Version #:0.9.28.2-8ubuntu1 b (possibly more but hidden beneath the tabbed dialogue to the right) FPC is version 2.4.0 SVN rev is 22277 -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On 12/04/2011 21:34, Bo Berglund wrote: Tools-Options-Environment-Window- [x] Show single button in TaskBar THere are no Options under Tools... I have found this: Environment-Options-Environment-Window Here I have the following checkboxes: []Minimize all on minimize main (checked and disabled) []Hide IDE windows on run []Hide Messages icons Then there is a panel dealing with window positions only. Can't see the one you suggest. The Lazarus Help/About box shows: Version #:0.9.28.2-8ubuntu1 b (possibly more but hidden beneath the right dialog, and tab. But the feature you look for only exists since 0.9.30 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to minimize/restore lazarus (Ubuntu)?
On 12/04/11 15:22, ik wrote: 2011/4/11 Flávio Etrusco flavio.etru...@gmail.com mailto:flavio.etru...@gmail.com (...) When doing this I had to look at files from the test application and then code back and forth. But it was very annoying that it seems not to be possible to minimize Lazarus and then clicking the Lazarus icon on the task bar to bring it all back up. There are a whole bunch of buttons on the task bar all having the Lazarus icon and when I click them I only get a single window of the IDE visible each time. So I have to click them in turn one by one. Why is this so (at least in Ubuntu 10)? These are the default behaviors of the platforms. Unfortunately there's no Window Manager for Linux/X that can automatically group windows of a process :-( Sure you have. I have it on my KDE (that I do not use it, but it's there), and I'm sure others also have it. On Mandriva 2010.2 using KDE, if i minimize the principal Lazarus IDE menu window, all the other windows are minimized too. If I then restore the main window, all the other windows are also restored. I didn't do anything to set this up - it seems to be the default on this system and version (Lazarus SVN 27340) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus