Krzysztof | 4 May 00:37 2016
Picon

TDrawGrid selection confusion

Hi Martin,

I'm lost with grids selections. How to make it work as simple
TListView with "report" mode and "rowselect"? First of all, by default
I don't see selection. So I checked this options:

  gridAlbum.datacols.options := gridAlbum.datacols.options+
    [co_fill,co_focusselect,co_mouseselect,co_rowselect];

Now I see what I selected. Going forward, real example from my app. I
have two grids. By default no one is selected (I mean row). Selecting
row in first grid, select first row in second grid (only if nothing
selected in second grid). Same rule for second grid, selecting
something select first row in first grid if nothing selected. Both
grids have only one column. Runtime issues:

1. If nothing selected, grid.row() return value below 0 (for example
-1073741823). Can I count on it? Should it be -1?
2. Tried with grid.getselectedrange.rowcount . If nothing selected
then it return 0 which is correct. So if it is 0 then I'm selecting
first row in second grid:

procedure TLibraryWidget.ArtistSelected(const sender: tobject);
begin
  writeln('artist selected|',gridAlbum.getselectedrange.rowcount);
  if gridAlbum.getselectedrange.rowcount=0 then
    gridAlbum.selectcell(makegridcoord(0,0),csm_select);
end;

Problem is that, selectcell() indeed select row (I see it visually)
(Continue reading)

Krzysztof | 3 May 23:09 2016
Picon

TEdit - delayed OnChange

Hi Martin,

This is only suggestion because I'm solving such things with timers
but I noticed that you like add new stuff ;) . I have TStringEdit used
for filters. Filter do some time consuming stuff (SQL query on big
database) so do this on each user typed char is overloaded. I have
implemented "delayed" OnChange using timer. My fake OnChange is called
after N (e.g 300 milliseconds) when user stop typing. Very handy.
Maybe you want to implement it or create new TDelayedEdit or something
like that. It is not "must need" because already solved it by timers.
There are two exceptions where OnChange is called immediately:
1. User press ENTER
2. User click on "clear" button

Regards

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 2 May 23:42 2016
Picon

TButton.imagepos - glue to the caption?

Hi Martin,

There is a lot of options in imagepos but icon is always anchored to
the button edges. I can play with imagedist, but it isn't it. Is it
possible anchor to the Caption? I mean if pos is ip_leftcenter then
icon is glue to the left edge of caption instead of button edge.

Regards

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 2 May 14:33 2016
Picon

PostMessage / SendMessage / Application.QueueAsyncCall

Hi Martin,

What is MSEgui message system? Can't find PostMessage for example for
close window itself:

PostMessage(Self.Handle, LM_CLOSEQUERY, 0, 0);

I'll also need alternative for LCL Application.QueueAsyncCall

Regards

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 30 Apr 22:34 2016
Picon

IDE - block comment / uncomment

Hi Martin,

I mentioned about this in other topic. In Lazarus if you select
multiple lines like:

if something then
begin
  foo;
  bar;
end;

... and press CTRL+SHIFT+V, it change it to:

// if something then
// begin
//   foo;
//   bar;
// end;

CTRL+SHIFT+U for uncomment selected block. Very handy. Is it possible
to implement it in MSEide?

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Martin Schreiber | 30 Apr 15:13 2016
Picon

Re: TForm.Icon - How to set from TimageList?

On Saturday 30 April 2016 14:59:03 Krzysztof wrote:
> Weird, on empty project is working fine. Let me do some investigating
> in my app. I'll make sure that all *.o and *.ppu are removed
>
What shows the stack window in case of the exception?

Martin

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 29 Apr 23:59 2016
Picon

TForm.Icon - How to set from TimageList?

Hi Martin,

I have TImageList filled with font awesome at runtime. I would like to
assign icon from that list into TMainForm.Icon. This code:

procedure tmainfo.afterconstruction;
begin
  inherited afterconstruction;
  IconMng.imlstDyn16.getimage(iICO16_MAIN, Self.icon);
  .....

... results with artifacts as in attached screen (mse_icon.png). Icon
already exists and is valid. Also tried this solution:

procedure tmainfo.afterconstruction;
var b: tmaskedbitmap;
begin
  inherited afterconstruction;
  b := tmaskedbitmap.create(bmk_rgb);
  IconMng.imlstDyn16.getimage(iICO16_MAIN, b);
  Self.icon.assign(b);
  b.Free;
  .....

It is better, I almost see icon but background still has artifacts
(mse_icon1.png)
(Continue reading)

Krzysztof | 29 Apr 23:19 2016
Picon

Child form position - main form center?

Hi Martin,

I have modal form with option fo_screencentered but is it possible to
center on main form? Second useful option could be "center on owner
window". Options I'm talking about in LCL are named as TForm.Position
= [poScreenCenter, poMainFormCenter, poOwnerFormCenter]

Regards

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 28 Apr 14:26 2016
Picon

TDrawgrid double click

Hi Martin,

How to correctly handle grid double click? I have this code executed
on double click on row:

tdrawgrid1.oncellevent :=  <at> GridCellEvent;

procedure TGenericListWidget.GridCellEvent(const sender: tobject;
  var info: celleventinfoty);
begin
  if (info.eventkind in [cek_buttonpress]) and
     (ss_double in info.mouseeventinfopo^.shiftstate)
  then
    Dosomething(Sender);
end;

Problem is that when I double click on column splitter for autosize
then code above is executed too. How to avoid this?

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Krzysztof | 28 Apr 00:02 2016
Picon

TIcon.Colorglyph - why doesn't work?

Hi Martin,

I have created spinner from this site:
http://preloaders.net/en/search/spinner . I need to change color
dynamically at runtime by changing TIcon.Colorglyph but it doesn't
work. I see that it work with your embedded stock glyphs (e.g. grids
sort indicator). But in my case it is always black. I'm not sure where
is the trick, is it in bitmap format or imagelist option? Here is what
I do:

1. Pick any spinner from that site. In website creator I'm checking:
 - ImageType: APNG
 - Transparent Background: Yes
 - Keep original colors: Yes
 - Invert colors: No
 - Rest options default
2. Click "generate preloader"
3. In "additional download options" check "download as sprites"
4. Click download
5. In MSE ide prepare imagelist size to downloaded preloader size. Add
downloaded spinner, it should be nicely split to 8 frames

Use attached demo

Sorry that I'm bother you recently but I'm close to finish porting my
LCL app and I'm very happy that it is going so well :) . This issue is
cosmetic and it is realy fine if spinner will be always black but I'm
curious guy :). Tried spinner generated from font awesome with rotate
option which you added but it doesn't look good - rotate animation is
fine but pixels have offset for each angle (frame) so animation is
(Continue reading)

Graeme Geldenhuys | 26 Apr 11:58 2016
Picon

MSEide can't code jump nested types

Hi Martin,

Recently I tried my hand at nested types (a private type defined inside
another type). I just realised that MSEide doesn't support nested types
- in that I can't Ctrl+Down or Ctrl+Up to navigate the methods from
Interface section to Implementation section or vice versa.

Are you planning to support this syntax in MSEide?

Here is an example of such a nested type in the interface section. I
placed comment markers to show the nested type code.

===========================================
  TfpgBaseTextEdit = class(TfpgWidget)
  private
    // nested type START
    type
      TSelDrag = (sdNone, sdMightDrag, sdDragging ,sdDragged);

      TSelection = object
      private
        FEdit: TfpgBaseTextEdit;
        FOrigin: TfpgPoint;
        FStartPos: TfpgPoint;
        FEndPos: TfpgPoint;
        procedure SetEndPos(AValue: TfpgPoint);
        procedure SetStartPos(AValue: TfpgPoint);
      public
        function  HasContent: Boolean;
        function  StartLine: Integer;
(Continue reading)


Gmane