Difference between revisions of "KeychainItem.Label"
From Xojo Documentation
m (Gperlman moved page KeyChainItem.Label to KeychainItem.Label) |
|||
Line 1: | Line 1: | ||
{{PropertyBox | {{PropertyBox | ||
| name=Label | | name=Label | ||
− | | owner=[[ | + | | owner=[[KeychainItem]] |
| ownertype=class | | ownertype=class | ||
| scope=public | | scope=public | ||
Line 15: | Line 15: | ||
<rbcode> | <rbcode> | ||
− | + | Dim kc As Keychain | |
− | + | Dim kci As KeychainItem | |
− | kc = New | + | kc = New Keychain(Listbox1.SelectedIndex) |
If kc <> Nil Then | If kc <> Nil Then | ||
− | kci = New | + | kci = New KeychainItem |
kci.ServiceName = SearchField.Value | kci.ServiceName = SearchField.Value | ||
Revision as of 23:50, 30 July 2019
Property (As String )
![]() |
This property is only available on the macOS platform. For cross-platform compatibility, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this property on an incompatible platform. |
aKeychainItem.Label = newStringValue
or
StringValue = aKeychainItem.Label
Supported for all project types and targets.
or
StringValue = aKeychainItem.Label
Supported for all project types and targets.
End-user editable string containing the label for this Keychain item.
Example
This example sets the text in a TextField to the value of the Label property.
Dim kc As Keychain
Dim kci As KeychainItem
kc = New Keychain(Listbox1.SelectedIndex)
If kc <> Nil Then
kci = New KeychainItem
kci.ServiceName = SearchField.Value
PasswordField.Value = kc.FindPassword(kci)
ServiceNameField.Value = kci.ServiceName
AccountNameField.Value = kci.AccountName
CommentField.Value = kci.Comment
LabelField.Value = kci.Label
End If
Dim kci As KeychainItem
kc = New Keychain(Listbox1.SelectedIndex)
If kc <> Nil Then
kci = New KeychainItem
kci.ServiceName = SearchField.Value
PasswordField.Value = kc.FindPassword(kci)
ServiceNameField.Value = kci.ServiceName
AccountNameField.Value = kci.AccountName
CommentField.Value = kci.Comment
LabelField.Value = kci.Label
End If