Thursday, January 27, 2022

Recent Questions - Stack Overflow

Recent Questions - Stack Overflow

Recent Questions - Stack Overflow


.gitignore not ignoring previously commited file in subdirectory despite *.<fileending>

Posted: 27 Jan 2022 08:26 AM PST

After having forgotten to include it in my .gitignore file, the file 'Labb1.mpf' was accidentally commited and sent upstream. Afterwards I added the line '*.mpf' into my gitignore file, but the file still showed up under 'Untracked Files' when I ran git status and became staged when I used 'git add .'. It was still in untracked files even after a commit which removed the file upstream. Labb.mpf is in a subdirectory with this structure:

C:.  │   .gitignore  |  └───Labb1      │   Labb1.mpf  

I eventually managed to make it not get included in 'git add .' by specifically writing out the full pathname in the gitignore file.

Labb1/Labb1.mpf  

If I comment out this line and only run '*.mpf', the file become staged with the git add command again.

This is a solution in a way, but I don't know why and it is not a very elegant solution for a problem that may very well come up in other circumstances. Do anyone have any ideas as to how to use the asterisk command to successfully ignore, in this case, .mpf files?

I have tried with both one and two asterisks.

how to set property custom control to be from beginning

Posted: 27 Jan 2022 08:26 AM PST

I created custom control (textbox) and I'm trying to make some validation on it

I'm using syncfusion textbox control so:

#1:

there is (NearImage) property to set image inside the textbox but when I added the code in Onpaint event but I don't see the image, how to set that property to be from the beginning?

#2:

how check (IsRequired ) property always not just when I leave the textbox?

    public partial class Jo_TextBox : TextBoxExt  {        #region Constructor        public Jo_TextBox()      {          InitializeComponent();          this.ThemesEnabled = false;          this.BackColor = Color.WhiteSmoke;          this.BorderStyle = BorderStyle.Fixed3D;          this.Border3DStyle = Border3DStyle.Flat;          this.Font = new Font("Tahoma", 10F);          this.ForeColor = Color.FromArgb(64, 64, 64);          this.TextAlign = HorizontalAlignment.Center;          this.RightToLeft = RightToLeft.Yes;          this.MaxLength = 50;          this.Size = new Size(250, 24);          }        

No comments:

Post a Comment