PHP expert |
|
Ey, ik heb een hele simpele applicatie die een soort van log in een multiline textbox schrijft, maar als de tekst langer is dan de textbox hoog is komt er een verticale scrollbalk, precies wat ik wil. Maar nu blijft de pointer boven de textbox staan, kan het ook zo dat je mee scrollt als er een scrollbalk komt?
Stelt niet veel voor, maar dit is wat ik heb.
private void btOpenDirectory_Click(object sender, EventArgs e)
{
FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
{
tbDirectory.Text = folderBrowserDialog.SelectedPath;
string[] files = Directory.GetFiles(tbDirectory.Text, "*", SearchOption.AllDirectories);
foreach (string file in files)
{
if (File.Exists(tbDirectory.Text + "/" + Path.GetFileName(file)) == false)
{
File.Move(file, tbDirectory.Text + "/" + Path.GetFileName(file));
this.tbDetails.Text += "Moving file: " + Path.GetFileName(file) + "\r\n";
}
}
string[] directories = Directory.GetDirectories(tbDirectory.Text, "*", SearchOption.AllDirectories);
foreach (string directory in directories)
{
if (Directory.GetFiles(directory).Length == 0)
{
Directory.Delete(directory);
this.tbDetails.Text += "Removing directory: " + directory + "\r\n";
}
}
}
}
private void btOpenDirectory_Click(object sender, EventArgs e) { FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog (); if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { tbDirectory.Text = folderBrowserDialog.SelectedPath; string[] files = Directory.GetFiles(tbDirectory.Text, "*", SearchOption.AllDirectories); foreach (string file in files) { if (File.Exists(tbDirectory.Text + "/" + Path.GetFileName(file)) == false) { File.Move(file, tbDirectory.Text + "/" + Path.GetFileName(file)); this.tbDetails.Text += "Moving file: " + Path.GetFileName(file) + "\r\n"; } } string[] directories = Directory.GetDirectories(tbDirectory.Text, "*", SearchOption.AllDirectories); foreach (string directory in directories) { if (Directory.GetFiles(directory).Length == 0) { Directory.Delete(directory); this.tbDetails.Text += "Removing directory: " + directory + "\r\n"; } } } }
|