我希望文本字段自动指向文本的末尾,一旦用户点击它。这在以前的setSelection中是有效的,但由于某种原因它停止了工作。现在,光标指向用户单击的任何位置。 HMTL: <TextField text="the cursor should point at the end when clicked" (focus)="onFocus($event.object)"> </TextField> TS: public onFocus(textfield): void {
textfield.android.setSelection(
我的视图中有一个TextBox和一个Button。
现在,我在单击按钮时检查条件,如果条件为假,则向用户显示消息,然后我必须将光标设置为TextBox控件。
if (companyref == null)
{
var cs = new Lipper.Nelson.AdminClient.Main.Views.ContactPanels.CompanyAssociation();
MessageBox.Show("Company does not exist.", "Error", MessageBoxButton.OK,