Ask Your Question
0

How is a macro assigned to a dialog control event?

asked 2019-06-05 06:49:26 +0200

DavidMcCracken gravatar image

updated 2019-06-05 06:51:58 +0200

Following the instructions of Pitonyak's "OpenOffic.org Macro Explained" Chapter 18 "Dialogs and Controls", I created a simple dialog with one button and tried to assign a macro (from the same library in which the dialog is defined) to mouse button up on that button. On preview, the dialog opens but clicking the button does nothing. I assigned a variety of my macros to every event of the button and none of them were triggered by anything I did to the button. Pitonyak mentions that he encountered problems assigning macros to dialog controls events under LO that he did not have under OO.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2019-06-05 07:17:18 +0200

Ratslinger gravatar image

Hello,

Have a sample you can examine on this post -> How to know which CommandButton called the macro?. It is in a simple Calc file and uses push button events but will show a working sample.

edit flag offensive delete link more
0

answered 2019-06-05 16:44:10 +0200

DavidMcCracken gravatar image

This was a dumb question-- the result of working too late. I was going to delete it but that would be unfair to Ratslinger, who took the time to answer. The problem was that the dialog preview only shows what the dialog will look like and does not invoke event actions. When the dialog is launched directly, macros assigned to controls' events work.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-05 06:49:26 +0200

Seen: 44 times

Last updated: Jun 05