Wish Set color of parameters in the code

Theera

Expert
Licensed User
Longtime User
Refer to this I've studied the code from the expert's example. I wish that the floattextfield which is parameter should changed having color (isn't white) when we read the code.

The best of regards.
 

Sagenut

Expert
Licensed User
Longtime User
I think that I didn't understood clearly.
Which parameters would you like to modify?
 

Theera

Expert
Licensed User
Longtime User
I think that I didn't understood clearly.
Which parameters would you like to modify?
I think that the color of parameters shouldn't be white. (i.e. it should be light green color which is different from the methods) please see the line of codes at12,13,14,15( FloatTextField parameters
should be highlighted)
 
Last edited:

Sagenut

Expert
Licensed User
Longtime User
floattext.jpg

Do you mean that the word FloatTextField should have the same color of Mainform?
Mainform has that color because it's a Global Variable, declared in Process_Global.
So it can be called from any point of the code.
FloatTextField instead is a Local variable.
It will exist and can be used only inside that Sub.
I think that is correct to have them highlighted with different colors to understand the difference.
Hoping that this time I understood the question. ;)
I agree that it could be nice to have local variable with some color different from white and different from Global variables.
 
Last edited:

Sagenut

Expert
Licensed User
Longtime User
You can find the Themes folder inside the installation folders of B4X products.
So you could create your own color scheme.
Just I didn't found (or I didn't understood) which one should be edited to change local variables color.
<Item Name="Collapsible Text" Foreground="0x00808080" Background="0x02000000" BoldFont="No"/>
<Item Name="Collapsible Region" Foreground="0x00303030" Background="0x00232323" BoldFont="No"/>
<Item Name="Delimiter Matching" Foreground="0x02000000" Background="0x00aaaaaa" BoldFont="No"/>
<Item Name="Current Line" Foreground="0x02000000" Background="0x02000000" BoldFont="No"/>
<Item Name="Current Statement" Foreground="0x02000000" Background="0x0008637d" BoldFont="No"/>
<Item Name="Find Match Highlight" Foreground="0x02000000" Background="0x00003877" BoldFont="No"/>
<Item Name="Indentation Guides" Foreground="0x02000000" Background="0x00333333" BoldFont="No"/>
<Item Name="Indicator Margin" Foreground="0x02000000" Background="0x00333333" BoldFont="No"/>
<Item Name="Line Numbers" Foreground="0x00AF912B" Background="0x001E1E1E" BoldFont="No"/>
<Item Name="Track Changes Before Save" Foreground="0x02000000" Background="0x0054b2af" BoldFont="No"/>
<Item Name="Track Changes After Save" Foreground="0x02000000" Background="0x00307457" BoldFont="No"/>
<Item Name="Outlining Margin Square" Foreground="0x00E2E2E2" Background="0x00000000" BoldFont="No"/>
<Item Name="Outlining Margin Vertical Rule" Foreground="0x00A5A5A5" Background="0x02000000" BoldFont="No"/>
<Item Name="Plain Text" Foreground="0x00C8C8C8" Background="0x001E1E1E" BoldFont="No"/>
<Item Name="Saved Changes Mark" Foreground="0x02000000" Background="0x00307457" BoldFont="No"/>
<Item Name="Unsaved Changes Mark" Foreground="0x02000000" Background="0x0084f2ef" BoldFont="No"/>
<Item Name="Visible Whitespace" Foreground="0x00524814" Background="0x02000000" BoldFont="No"/>
<Item Name="Code Snippet Field" Foreground="0x02000000" Background="0x00555555" BoldFont="No"/>

<Item Name="Comment" Foreground="0x007B7466" Background="0x02000000" BoldFont="No"/>
<Item Name="Identifier" Foreground="0x00C8C8C8" Background="0x02000000" BoldFont="No"/>
<Item Name="Sub Name" Foreground="0x00C8C8C8" Background="0x02000000" BoldFont="Yes"/>
<Item Name="Unknown Identifier" Foreground="0x004444AA" Background="0x02000000" BoldFont="No"/>
<Item Name="Number" Foreground="0x0022CDFF" Background="0x02000000" BoldFont="No"/>
<Item Name="Operator" Foreground="0x00B7E2E8" Background="0x02000000" BoldFont="No"/>
<Item Name="String" Foreground="0x000076EC" Background="0x02000000" BoldFont="No"/>
<Item Name="Keyword" Foreground="0x0063C793" Background="0x02000000" BoldFont="No"/>
<Item Name="Preprocessor Keyword" Foreground="0x00BD82A0" Background="0x02000000" BoldFont="No"/>
<Item Name="Global Variable" Foreground="0x00B48C8C" Background="0x02000000" BoldFont="No"/>
<Item Name="Annotation" Foreground="0x00E4E2E0" Background="0x02000000" BoldFont="No"/>
<Item Name="Type" Foreground="0x00B18C67" Background="0x02000000" BoldFont="No"/>
<Item Name="Excluded Code" Foreground="0x00616161" Background="0x02000000" BoldFont="No"/>
<Item Name="Selection Highlight" Foreground="0x00FFFFFF" Background="0x00777777" BoldFont="No"/>
<Item Name="Search Result" Foreground="0x02000000" Background="0x00aaaaaa" BoldFont="No"/>
<Item Name="Syntax Error" Foreground="0x000000FF" Background="0x02000000" BoldFont="No"/>
<Item Name="Warning" Foreground="0x0022CDFF" Background="0x02000000" BoldFont="No"/>
<Item Name="Underline Word" Foreground="0x00FF0000" Background="0x02000000" BoldFont="No"/>
 

Theera

Expert
Licensed User
Longtime User
View attachment 159284
Do you mean that the word FloatTextField should have the same color of Mainform?
I mean that the word FloatTextField as local variable should have the colored highlighted , but has the different color of Mainform.
 

Sagenut

Expert
Licensed User
Longtime User
I mean that the word FloatTextField as local variable should have the colored highlighted , but has the different color of Mainform.
I agree.
Unluckily it looks like it's not possible to change that color actually even modifying the color scheme file.
But I could be wrong.
 

Sagenut

Expert
Licensed User
Longtime User
Local variables are interpreted as Identifier (for color scheme).
So the result is this if you set a different color
colors.png

Not the best option.
 

Theera

Expert
Licensed User
Longtime User
Local variables are interpreted as Identifier (for color scheme).
So the result is this if you set a different color
View attachment 159287
Not the best option.
I think it should changed only the word of local variables which are in sub modules so that detecting to be local variables.
 

Sagenut

Expert
Licensed User
Longtime User
I think it should changed only the word of local variables which are in sub modules so that detecting to be local variables.
Such a change can be made only from @Erel internally to the editor.
I agree with your Wish and I support it with a +1.
 
Top