mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
BackblazeB2: Remove SetPlaceHolderText() and use SetWatermark()
This commit is contained in:
parent
140d583a1c
commit
b0c1a21c27
2 changed files with 2 additions and 18 deletions
|
@ -124,7 +124,8 @@ private void InitializeControls()
|
|||
cbCustomUploaderResponseType.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ResponseType>());
|
||||
|
||||
// Backblaze B2
|
||||
SetPlaceholderText(txtB2Bucket, "Optional, only used if you didn't set a bucket when you made the key");
|
||||
txtB2Bucket.HandleCreated += (sender, e) =>
|
||||
txtB2Bucket.SetWatermark("Optional, only used if you didn't set a bucket when you made the key", showCueWhenFocus: true);
|
||||
|
||||
#if DEBUG
|
||||
btnCheveretoTestAll.Visible = true;
|
||||
|
|
|
@ -1576,22 +1576,5 @@ private void ConfigureOAuthStatus(OAuthControl oauth2, bool result)
|
|||
}
|
||||
|
||||
#endregion Generic OAuth2
|
||||
|
||||
#region Miscellaneous
|
||||
|
||||
/// <summary>
|
||||
/// Adds or replaces placeholder text in a text box without affecting the content (<c>.Text</c>) of the
|
||||
/// text box.
|
||||
/// </summary>
|
||||
/// <param name="textBox">The TextBox to operate on.</param>
|
||||
/// <param name="text">Text to display to the user.</param>
|
||||
public static void SetPlaceholderText(TextBox textBox, string text)
|
||||
{
|
||||
// https://stackoverflow.com/a/22405509
|
||||
const int EM_SETCUEBANNER = 0x1501;
|
||||
NativeMethods.SendMessage(textBox.Handle, EM_SETCUEBANNER, 0, text);
|
||||
}
|
||||
|
||||
#endregion Miscellaneous
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue