listviewdialog result lazarus / 43-Android ---------------------------------------------------------------------- zariq · 2013-01-30 09:23 hello everyone. I would like to ask about an issue with listviewdialog. If changes are made in OnListViewDialogResult they don't show up until the form is clicked. As an example if you change the caption of a label, then the label's caption gets changed but it doesn't show on the screen until the form gets clicked. If you want to show another form depending on the user's choice, then after the listviewdialog has disappeared, again nothing happens until the form is clicked, then the new form shows. lazarus 1.1-39905 windows 7 thanks. ---------------------------------------------------------------------- wjackson153 · 2013-01-30 09:33 Perhaps update or refresh or put in on change event? ---------------------------------------------------------------------- zariq · 2013-01-30 09:53 Quote from: wjackson153 on January 30, 2013, 10:33:05 amPerhaps update or refresh or put in on change event? Have tried refresh, update, invalidate, repaint, have i missed anything? Haven't thought about onchange, but the listview is called via jni and onlistviewdialogresult is the equivalent for onchange. ---------------------------------------------------------------------- wjackson153 · 2013-01-30 10:04 on create, on activate, on show ---------------------------------------------------------------------- zariq · 2013-01-30 15:02 A bit more information The code is from here. http://wiki.lazarus.freepascal.org/Android_Interface#Using_the_Native_ ListView_Dialog Code: [Select]procedure TForm1.Button1Click(Sender: TObject); begin   {$ifdef Android}   CDWidgetSet.ShowListViewDialog('Dialog Title',     ['Title1', 'Title2', 'Title3', 'Title4', 'Title5', 'Title6','Title7','Title8'],     ['Descr1', 'Descr2', 'Descr3', 'Descr4', 'Descr5', 'Descr6','Descr7','Descr8']);   {$endif} end; Code: [Select]procedure TForm1.MyOnListViewDialogResult(ASelectedItem: Integer); begin    label1.caption := 'new value';    form2.show;    DebugLn(label1.caption); end; When the dialog disappears form1 is still showing on the screen. Logcat shows that label1's caption has changed to "new value" but label1 is still showing the old value. If the back key is pressed on the emulator or phone then form1 is still showing on the screen and label1 shows the new correct value. Instead of the back button if you click somewhere on the form then then form2 shows. When returning back to form1 label1 has the correct "new value".