Forum Discussion
EnTerr
14 years agoRoku Guru
"renojim" wrote:
I'd say the documentation is inaccurate. SetFocusedMenuItem() doesn't really use the same ID used by AddButton(). AddButton() probably creates an array and then SetFocusedMenuItem() is a 0-based index into that array. So even if the first button you add has an ID of 999, you'd use SetFocusedMenuItem(0) to highlight it.
that explains the behavior. but why did they add IDs then? it's not like you can replace an ID or remove by ID. the only use i can think is ArrogantPopup:
dlg = createobject("romessagedialog")
dlg.setText("This dialog will ignore your selection. Do you care?")
dlg.addButton(42, "Yes")
dlg.addButton(42, "No")
dlg.addButton(42, "None of the above")