Update: 2018 Beta 6 (free for everybody)

New release and update announcements

Re: Update: 2018 Beta 4 (free for everybody)

Postby pmk65 » Tue Mar 27, 2018 1:34 pm

Thanks for clearing that up. :)

Is it possible to extend the TImageList component, so it can accept TPicture in addition to TBitmap?
TBitmap is very limited (.BMP and .ICO) and doesn't allow for alpha channel transparency like in .PNG files.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 564
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Update: 2018 Beta 4 (free for everybody)

Postby Emulman » Tue Mar 27, 2018 2:14 pm

another simple request to the editor: in some editor like notepad++ when you press enter key the cursor goes to the start of next line. It is very useful, above all when you are at the end of a line the cursor automatically goes into next line. You can add this? perhaps you must add some special control character?
Emulman
 
Posts: 34
Joined: Thu Jan 19, 2006 8:22 pm
Location: Genoa, Italy

Re: Update: 2018 Beta 4 (free for everybody)

Postby Aivars » Tue Mar 27, 2018 2:57 pm

pmk65: the standard TImageList does not accept anything else. We are using another, commercial alternative.

It should be possible to force the standard TImageList to support partial transparency with BMPs though:

1) Set ImageList.ColorDepth = 6 (cd32Bit) and ImageList.DrawingStyle = 3 (dsTransparent).

2) Use application called PixelFormer (I'm sure other applications exist, too) to import PNG and export BMP with Alpha

3) Load the BMP in B: TBitmap, then use ImageList.Add(B, nil)

This code worked for me:
Code: Select all
  var ImgList = TImageList.Create(dockForm);
  ImgList.ColorDepth = 6;
  ImgList.DrawingStyle = 3;
  ImgList.SetSize(32, 32);
  var B = TBitmap.Create;
  B.LoadFromFile("c:\\temp\\account_balances.bmp");
  var i = ImgList.Add(B, nil);
  delete B;
  btnOk.Images = ImgList;
  btnOk.ImageIndex = i;
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 4 (free for everybody)

Postby Aivars » Tue Mar 27, 2018 3:02 pm

Emulman: I'm sorry, I don't really understand. If you press ENTER, a new line is created and the cursor is put at the correct indenting. Do you want it to go to the next line without creating a newline? That doesn't sound right, so I'd like more details, maybe screenshots or video if possible. But please post it to Feature Requests section of the forum, not here - that's the proper place, we can discuss it easier and I can link to it easier :)
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 4 (free for everybody)

Postby Emulman » Tue Mar 27, 2018 3:09 pm

[quote="Aivars"]Emulman: I'm sorry, I don't really understand. If you press ENTER, a new line is created and the cursor is put at the correct indenting. Do you want it to go to the next line [b]without[/b] creating a newline? That doesn't sound right, so I'd like more details, maybe screenshots or video if possible. But please post it to Feature Requests section of the forum, not here - that's the proper place, we can discuss it easier and I can link to it easier :)[/quote]

no i explain badly! when you create a new line there is surely a new-line ascii char. Now when you return on that line with the cursor arrive at the end of the line and the cursor automatically goes to the start of next line, a feature which now is not present..have you understood' cmq i put it in the feature list!
Emulman
 
Posts: 34
Joined: Thu Jan 19, 2006 8:22 pm
Location: Genoa, Italy

Re: Update: 2018 Beta 4 (free for everybody)

Postby Aivars » Tue Mar 27, 2018 3:22 pm

Maybe you're thinking of this... Try menu Options -> Preferences -> Text Editor -> Constrain cursor to text
Is that it?
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 5 (free for everybody)

Postby Aivars » Tue Mar 27, 2018 3:47 pm

Beta 5 fixes

Fix: When dragging document on Hi-Def screen, the fonts become smaller
Fix: Toolbar stopped saving/loading customized icons
Fix: DLNA feature of Windows caused My Computer to trigger unnecessary refreshes in File Explorer
Fix: Restructured plugins to avoid multpiple SelStart, SelLength etc
Fix: slowness with big files and unclosed quotes or cursor inside quotes

Beta 5 improvements

Keyboard Shortcuts dialog now allows sorting shortcuts
Open Linked File feature will now alternatively look for the file from project's root, if can't be found relative to current document
Single line can now be copied from Output dialog
Delayed syntax check is triggered on save
Plugins: "ready" signal will be also fired after plugin is installed
Plugins: TRichEdit.SelAttributes added
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 5 (free for everybody)

Postby pmk65 » Wed Mar 28, 2018 11:26 pm

I have experienced an odd behavior in Code Explorer where it at some function, starts displaying the remaining functions INSIDE this function "folder" as children.

Notice the function "OnClickSelectGulpfile". Here all the remaining functions, properties etc. get listed as children. (If you need the code snippet I can send it to you.)

Image

Another weird behavior is when I enable a plugin in Plugin Manager, then it triggers the "onReady" signal in other plugins.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 564
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Update: 2018 Beta 5 (free for everybody)

Postby Aivars » Thu Mar 29, 2018 10:55 am

Yes, please send it, since the gulpdock.js that you sent me earlier doesn't appear to have this problem.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 5 (free for everybody)

Postby pmk65 » Thu Mar 29, 2018 12:36 pm

Aivars wrote:Yes, please send it, since the gulpdock.js that you sent me earlier doesn't appear to have this problem.


I send you the gulpdock.js file + a video capture of the OnReady problem.

Not sure if this is a bug or not. But if I set the "Name" property of a component like TEdit.

Code: Select all
Edit1.Name = "testing";


And then disable/enable the plugin, I get a crash with this exception message: "A component with the name testing already exists."
(Doesn't matter what name I use. It always crash after re-enabling)
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 564
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Update: 2018 Beta 5 (free for everybody)

Postby Aivars » Thu Mar 29, 2018 5:17 pm

OnReady will be fixed in the next beta. I'll see if I can do anything about JS code explorer issue.

Regarding names - you need to process the "exit" signal and delete all components that you created because names indeed must be unique. Deleting the owner is enough because all components that it owns will get deleted as well. I'm assuming you're using your DevMode component so every time you save the script, the plugin gets restarted and if it didn't manage to delete Edit1 during the previous run, you will get this error.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 5 (free for everybody)

Postby pmk65 » Fri Mar 30, 2018 4:27 am

I figured that it was something with deleting the components. Thanks for the info.

I noticed that the position of TButton images has a wrong offset, and it's currently not possible to set image margins or alignments.
I removed transparency on all images so they have a full square. The image/square is too close to the left side of the button. And making the button wider doesn't help. (see the "Copy All" button) doesn't help. Also the top/bottom margin differs.

Image

And a small *bug*.
When holding down the Alt key and right clicking the mouse in the editor window, the context menu flashes on/off instantly. (Doesn't happen if it's Shift or Ctrl that is pressed)
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 564
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Update: 2018 Beta 5 (free for everybody)

Postby Aivars » Fri Mar 30, 2018 12:07 pm

I'll add classes required for accessing ImageMargins and ImageAlignment from pluginscripts. Regarding Top/Bottom margin - probably there's odd number of pixels left over.

Regarding wrong offset - there's no trickery, that's the standard TButton as they come. Usually when we want buttons with images we avoid using TButton. TBitBtn looks better (but has issues with image lists). I would recommend using plain-text buttons anyway, they look more modern.

What you see with Alt + right click is the standard windows behavior, you can try it in e.g. notepad.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Update: 2018 Beta 5 (free for everybody)

Postby pmk65 » Fri Mar 30, 2018 12:43 pm

Aivars wrote:I'll add classes required for accessing ImageMargins and ImageAlignment from pluginscripts. Regarding Top/Bottom margin - probably there's odd number of pixels left over.


Could be, as I calculate the width/height based on the font size, like this:
Code: Select all
Button.Width = PSForm.Canvas.TextWidth(Button.Caption) + Imagelist1.Width + bhPadding + bhPadding;
Button.Height = PSForm.Canvas.TextHeight("Jj") + bvPadding + bvPadding;


Aivars wrote:Regarding wrong offset - there's no trickery, that's the standard TButton as they come. Usually when we want buttons with images we avoid using TButton. TBitBtn looks better (but has issues with image lists). I would recommend using plain-text buttons anyway, they look more modern.


I probably could "fix" the margin/alignment issue by creating larger images on the TImageList, to compensate for the margins.
I started out with using TBitBtn, but as you said it had other issues (alpha transparency). So when TImageList was available, I switched to TButton.
Right now Im just testing various options, but I probably end up with TButtons without images as you suggested :)

While we are at the subject of margins. ;)

1) Could you enable support for TMargin as well?
2) And add a property to increace the spacing between TTreeView nodes, as the default is very "cramped". (Something like this: http://www.swissdelphicenter.ch/en/showcode.php?id=2154)
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 564
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Update: 2018 Beta 5 (free for everybody)

Postby Aivars » Fri Mar 30, 2018 2:27 pm

Already added TMargins and TPadding, too.

I'll write down your tree view suggestion, but that will have to wait for later.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2265
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

PreviousNext

Return to Announcements

Who is online

Users browsing this forum: No registered users and 1 guest

cron