Reaction/ClassAct

How to know MouseX/MouseY when RMB is pressed without to use RMB_Trap ?

Hi,
Again me with another question about Reaction/Intuition.

Sorry for all these newby questions... It's my first Reaction project...

In my program i have to catch MouseX/MouseY where the user hit the RMB.

I do that without problem in WMHI_MOUSEBUTTONS / MENUDOWN. I can even use a popupmenu.
I only have to add WINDOW_GadgetHelp,TRUE and WA_RMBTrap, TRUE to my window.

It works, it's perfect !

Forums: 

Catch Enter in strings

I am opening a window with a string gadget and OK and Cancel buttons. I use WMHI_VANILLAKEY to catch Enter (13) and Escape (27) keys to act as if the buttons were clicked.

The problem I have is when typing in string gadget and hit Enter it automatically closes the window at VANILLAKEY with Enter (13) key. How do I stop this?

I want:

type type type ENTER
deactivate string gadget
Enter (fake click on OK button)

I have been trying to catch it with a hook but can't quite get it to do want I want.

Forums: 

[solved] How to retrieve the Gadget ID in WMHI_MOUSEBUTTONS or in a WINDOW_AppMsgHook hook ?

Hi,
I would like to retrieve the GadgetID of the gadget where I use Right Mouse Button or where I drag an external object on it. Is it possible ?

For now, it works for me in Left mouse button release.

Forums: 

[solved] How to know the width/height of a non opened Window ?

Hi,
I'm building a window with dynamic added gadgets inside.

All works but I wonder how to know the Width and Height of a window BEFORE to open it.

I want to use these informations to position my window on the screen before to open it without to use WINDOW_Position.

Is it possible ?

the following function returns "0 x 0" before WM_OPEN and "476 x 68" after that the window is opened

Forums: 

[solved] How to make a Window iconified at activation ?

Hi,
I try again to mimic MUI function in Reaction.

In MUI, you can start a program in iconified state using "set(app,MUIA_Application_Iconified,TRUE) ;".

With Reaction, Window seems to have to be opened before to be iconified. Therefore, you see the window a short time and it's iconified using "IDoMethod(win, WM_ICONIFY) ;"

I didn't find a Window.class parameter to start a window in iconified state.

Does it exist ?

Thank you (and sorry for all these newbies questions that I ask currently)

Forums: 

[solved] How to make an Object the active one at window opening ?

Hi,
Does it exist, in Reaction, a way to make an Object active without user input ?

For example, in a window with a simple "OK" button, is there a way to make this button active ? A simple "Return" key press will press it ?

In MUI, there is a "set(window,MUIA_Window_ActiveObject,MyButton);". any Reaction equivalent ?

I tried,
IIntuition->ActivateGadget(GAD(OBJ_ABT_OK), window_About,NULL) ;
without success...

Thank you

Forums: 

StringObject ReadOnly

Is there a way to make a string object read only YET still allow to click in to copy the text? I don't want the user to be able to type or delete characters, but still copy the string to paste somewhere else (text editor).

I would imagine it would need a hook and ignore all input (except double click to select all, then Copy).

This would make for a nice addition to the class.

STRINGA_NoInput, TRUE,

Windows has this very handy feature; we need it.

Forums: 

Weightbar resize BOOPSI gadget

I have a BOOPSI gadget class that is just a box. Above it is a weightbar that can grow/shrink my gadget's height. Is there a way to make the width grow with it to keep an "aspect ratio" of sorts?

Height increased by 2, width increased by 4.

My gadget is the left most. There are other gadgets to the right of it. They would have to shrink in width while the main one grows in width. The other gadget heights do not change.

Forums: 

Pages

Subscribe to RSS - Reaction/ClassAct