General discussion about plugins.

Browse, download and discuss plugins for Blumentals code editors

Re: General discussion about plugins.

Postby pmk65 » Sat Nov 17, 2018 7:11 pm

Im trying to read the contents of "\Program Files (x86)\WeBuilder 2018\data\newdoc.ini" in a plugin, but I have problems reading the sections starting with a "%", like [%types]. Do you need to escape the value in order to read those?

Code: Select all
[%types]
htm
css
js
vbs
php
...

[htm]
Description=HTML
Extension=htm
Template=HTML\Default.htm
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 663
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: General discussion about plugins.

Postby Aivars » Tue Nov 20, 2018 4:43 pm

I don't think the problem is with the section name (%types) but with the fact that the keys have no corresponding values. This is a historic thing and it's somewhat annoying. We read those values using IniFile.ReadSectionValues and I think that method is available for pluginscripts, too.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2374
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: General discussion about plugins.

Postby LouanneSierra » Wed Apr 03, 2019 1:48 pm

The present usage of TMemo and TRichText doesn't have support for choosing content AFIK. All that I attempted fizzles. Do you have a working precedent on the most proficient method to do this?
LouanneSierra
 
Posts: 1
Joined: Fri Mar 29, 2019 2:48 pm

Re: General discussion about plugins.

Postby pmk65 » Wed Apr 03, 2019 10:53 pm

LouanneSierra wrote:The present usage of TMemo and TRichText doesn't have support for choosing content AFIK. All that I attempted fizzles. Do you have a working precedent on the most proficient method to do this?


TRichText.Lines.Text will return the content of TRichText. Same should work for TMemo.

But try posting an example of what you are doing so far and an explanation of what you are trying to attempt.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 663
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: General discussion about plugins.

Postby pmk65 » Sat Dec 28, 2019 10:09 pm

I have a problem with aligning items when the container (Docking panel) is resizable.

I got a number of TCheckBox'es, displayed vertically like this:
Code: Select all
----------------------------------------
| □ this is the first checkbox caption  |
| □ this is the second checkbox caption |
| □ this is the last checkbox caption   |
----------------------------------------

My problem is that I can't figure out how to setup the anchors etc. so that each TCheckBox caption is still visible (like this) when docking panel is resized.
Code: Select all
------------------------
| □ this is the first  |
|   checkbox caption   |
| □ this is the second |
|   checkbox caption   |
| □ this is the last   |
|   checkbox caption   |
------------------------


I have set WordWrap to true on the TCheckBox items, which wraps the text correctly. But the height of the TCheckBox does not resize, only the width.


And here's a couple more questions:

1) To adjust sizes/positions of GUI elements, the value can be multiplied with the factor stored in Script.DpiScale. But how do you adjust the font size? I can use the WeBuilder base font size in WeBuilder.Font.Size and WeBuilder.Font.Height (Not quite sure what the difference is, other than different values). But these values are negative numbers. Are they automatically set to the correct value, or do I also have to multiply that value with the factor stored in Script.DpiScale?

2) What VCL/Delphi color codes/aliases (like "clWindowText") are used in WeBuilder for the various components? Can you make a list of those? As I assume there's a general color alias used for background, button color etc. So by using that, there will be no need to adjust the colors for each theme.
My plugin docking panel has grey background color as default but that doesn't match the background color of the interface style of Flat Blue, which I'm currently using.

3) Can I access the Preferences -> General -> Interface Language from a plugin? That would be useful to create multilingual plugins.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 663
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Previous

Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 0 guests