Skip to content

Added changeable properties for external control (readOnly and scrollBar variables) #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Empty file.
Binary file added .vs/CustomControls/v17/.suo
Binary file not shown.
Binary file added .vs/MineRJControls/v17/.wsuo
Binary file not shown.
2 changes: 1 addition & 1 deletion CustomControls/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
2 changes: 1 addition & 1 deletion CustomControls/CustomControls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>CustomControls</RootNamespace>
<AssemblyName>CustomControls</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
Expand Down
30 changes: 15 additions & 15 deletions CustomControls/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions CustomControls/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions CustomControls/RJControls/RJTextBox.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions CustomControls/RJControls/RJTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public partial class RJTextBox : UserControl
//Events
public event EventHandler _TextChanged;

//Changeable properties for external control
public Boolean readOnly = false; // set ReadOnly state to true
public Boolean scrollBar = false; // set a "Vertical" scroll bar for multiline textboxes

#endregion

//-> Constructor
Expand Down Expand Up @@ -334,10 +338,27 @@ private void textBox1_TextChanged(object sender, EventArgs e)
{
if (_TextChanged != null)
_TextChanged.Invoke(sender, e);

// if readonly true
if (readOnly)
textBox1.ReadOnly = true;
else
textBox1.ReadOnly = false;

// if scroll bar true
if (scrollBar)
textBox1.ScrollBars = ScrollBars.Vertical;
else
textBox1.ScrollBars = ScrollBars.None;
}
private void textBox1_Click(object sender, EventArgs e)
{
this.OnClick(e);

if (readOnly)
textBox1.ReadOnly = true;
else
textBox1.ReadOnly = false;
}
private void textBox1_MouseEnter(object sender, EventArgs e)
{
Expand Down
Binary file modified CustomControls/bin/Debug/CustomControls.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion CustomControls/bin/Debug/CustomControls.exe.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
Binary file modified CustomControls/bin/Debug/CustomControls.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2a45816bda5afc2e11cab01d25f8c6e67c53281a
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
C:\Projects\MineRJControls\CustomControls\bin\Debug\CustomControls.exe.config
C:\Projects\MineRJControls\CustomControls\bin\Debug\CustomControls.exe
C:\Projects\MineRJControls\CustomControls\bin\Debug\CustomControls.pdb
C:\Projects\MineRJControls\CustomControls\bin\Debug\FontAwesome.Sharp.dll
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.csproj.AssemblyReference.cache
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.csproj.SuggestedBindingRedirects.cache
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Form1.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Test.FormButton.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Test.FormComboBox.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Testing.FormDatePicker.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Testing.FormMiniatura.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Testing.FormRadioButton.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.FormTextBox.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Properties.Resources.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.RJControls.RJTextBox.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.Testing.FormToggleButton.resources
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.csproj.GenerateResource.cache
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.csproj.CoreCompileInputs.cache
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.csproj.CopyComplete
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.exe
C:\Projects\MineRJControls\CustomControls\obj\Debug\CustomControls.pdb
Binary file not shown.
Binary file added CustomControls/obj/Debug/CustomControls.exe
Binary file not shown.
Binary file added CustomControls/obj/Debug/CustomControls.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/FontAwesome.Sharp.5.15.3/.signature.p7s
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.