[Lazarus] Call context menu in my component

2018-03-10 Thread AlexeyT via Lazarus
Hi. I try to call context menu inside ATSynEdit: - DoContextMenu(...)- does nothing - Perform(LM_CONTEXTMENU, 0, 0)- does nothing - WMContextMenu() must work but I need TMessage param for it, how to get it? -- Regards, Alexey -- ___ Lazarus mailing

Re: [Lazarus] SQLdb_Tutorial3 error

2018-03-10 Thread Santiago A. via Lazarus
El 09/03/2018 a las 10:41, Santiago A. via Lazarus escribió: > El 08/03/2018 a las 20:42, leledumbo via Lazarus escribió: >>> Any hint? >> Code please. Zipped project directory (use Publish Project feature) is OK if >> single file example is not possible. > I will zip it, but sure you have it. The

Re: [Lazarus] Special Request: Theme entire IDE support

2018-03-10 Thread Vojtěch Čihák via Lazarus
Hi,   you can do it for Qt applications, just run Lazarus (or any Laz. project built as Qt) as:   ./lazarus -stylesheet mydarkstyle.qss   where mydarkstyle.qss must be valid Qt Style Sheet file, see:  http://doc.qt.io/archives/qt-4.8/stylesheet.html#stylesheet   V. ___

Re: [Lazarus] Special Request: Theme entire IDE support

2018-03-10 Thread zeljko via Lazarus
On 03/10/2018 02:41 PM, Vojtěch Čihák via Lazarus wrote: Hi, you can do it for Qt applications, just run Lazarus (or any Laz. project built as Qt) as: ./lazarus -stylesheet mydarkstyle.qss where mydarkstyle.qss must be valid Qt Style Sheet file, see: http://doc.qt.io/archives/qt-4.8/stylesh

Re: [Lazarus] Call context menu in my component

2018-03-10 Thread Vojtěch Čihák via Lazarus
Hi,   DoContextMenu(...) cannot work, this method only manages OnContextPopup event. Perform(LM_CONTEXTMENU, 0, 0) (or SendMessage or PostMessage) works here (Qt). Handle must have assigned PopupMenu and it needs correct parameters, not just (...,0, 0) which shows Popmenu in the top-left screen

[Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM

2018-03-10 Thread Sandro Cumerlato via Lazarus
Hello, how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" format? (as default it is saved to "UTF-8 without BOM" format) Thank you in advance for your help! Sandro Cumerlato -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide

Re: [Lazarus] Special Request: Theme entire IDE support

2018-03-10 Thread AlexeyT via Lazarus
On 10.03.2018 18:53, zeljko via Lazarus wrote: But again I've found scrollbars problematic since they look ugly when they're completely drawn by stylesheet :) I thinked about how to replace LCL scrollbas with ATScrollbar. Ie some LCL change which hooks SetScrollInfo too. Maybe it's possible to

[Lazarus] Suggest LCL refactor for ShowContextMenu

2018-03-10 Thread AlexeyT via Lazarus
Maybe it's good to have LCL method to show context menu, w/o using Perform(LM_contextmenu,...). Name it ShowContextMenu(X, Y) - method must be main part of TControl.WMContextMenu procedure TControl.WMContextMenu(var Message: TLMContextMenu); var   TempPopupMenu: TPopupMenu;   P: TPoint;   Hand

Re: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM

2018-03-10 Thread Mattias Gaertner via Lazarus
On Sat, 10 Mar 2018 16:57:08 +0100 Sandro Cumerlato via Lazarus wrote: > Hello, > how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" > format? (as default it is saved to "UTF-8 without BOM" format) var s: string; ms: TMemoryStream ms:=TMemoryStream.Create; try s:

Re: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM

2018-03-10 Thread Michael Van Canneyt via Lazarus
On Sat, 10 Mar 2018, Mattias Gaertner via Lazarus wrote: On Sat, 10 Mar 2018 16:57:08 +0100 Sandro Cumerlato via Lazarus wrote: Hello, how can I save StringGrid content to a CSV file encoded to "UTF-8 with BOM" format? (as default it is saved to "UTF-8 without BOM" format) var s: string;

Re: [Lazarus] LCLMessageGlue.pas, typo in debug output?

2018-03-10 Thread Mattias Gaertner via Lazarus
On Fri, 9 Mar 2018 10:17:24 +0100 Lubos Pintes via Lazarus wrote: > Hello, > Just noticed in LCLMessageGlue.pas on line 98: > and (TLMessage(AMessage).Msg < CN_KEYDOWN ) > maybe there could be <> like on other lines in that IFDEF? > Not sure, just noticed little asymmetry. It's merely debugging

Re: [Lazarus] Special Request: Theme entire IDE support

2018-03-10 Thread R0b0t1 via Lazarus
On Saturday, March 10, 2018, Vojtěch Čihák via Lazarus < lazarus@lists.lazarus-ide.org> wrote: > Hi, > > > > you can do it for Qt applications, just run Lazarus (or any Laz. project built as Qt) as: > > > > ./lazarus -stylesheet mydarkstyle.qss > > > > where mydarkstyle.qss must be valid Qt Style S

Re: [Lazarus] Special Request: Theme entire IDE support

2018-03-10 Thread Mattias Gaertner via Lazarus
On Fri, 9 Mar 2018 22:41:19 -0500 Anthony Walter via Lazarus wrote: >[...] > As it stand Lazarus has already the ability to change the color of the > source code editor, and some support for changing the object inspector > colors, and message window colors, but all three of these customization >

Re: [Lazarus] Menu editor unstable?

2018-03-10 Thread Bilbo47 via Lazarus
Lazarus would become unresponsive after trying to add a new menu item using the Menu Editor. Don't know what the problem was. Got around it by manually adding the menu item by editing the .LFM file while Lazarus was not running. Also added the declaration and procedure body for the Click event in t

Re: [Lazarus] StringGrid1.SaveToCSVFile - UTF-8 with BOM

2018-03-10 Thread Sandro Cumerlato via Lazarus
Thank you Mattias and Michael for your help! procedure TForm1.ButtonSaveClick(Sender: TObject); const UTF8BOM = #$EF#$BB#$BF; var s: String; fs: TFileStream; begin s := ChangeFileExt(Application.ExeName, '.csv'); try fs := TFileStream.Create(s, fmCreate); fs.Write(UTF8BOM, SizeOf