Thank you for your reply! Now it works 
I misunderstood this property…
(Code sample below)
import h2d.Interactive;
import hxd.res.DefaultFont;
import hxd.App;
class H2DInteractivePanel extends hxd.App {
override function init() {
var b = UI.newButton_standard("Default (no right click)", this.s2d );
b.onClick = function(e){b.backgroundColor = 0xFF99ff99; };
var b = UI.newButton_standard("Right click allowed (calls same function)", this.s2d );
b.enableRightButton = true;
b.onClick = function(e){b.backgroundColor = 0xFF99ff99; };
var b = UI.newButton_standard("Behaves differently: left/right/shift-click", this.s2d );
b.enableRightButton = true;
b.onClick = function(e){
if( hxd.Key.isReleased(hxd.Key.MOUSE_LEFT) )
b.backgroundColor = 0xFF99ff99;
if( hxd.Key.isReleased(hxd.Key.MOUSE_RIGHT) )
b.backgroundColor = 0xFF99ccff;
if( hxd.Key.isDown(hxd.Key.SHIFT) )
b.backgroundColor = 0xFFffcc66;
};
}
public static function main() {
new H2DInteractivePanel();
}
}
// this is just to set up the example
class UI {
private static var yy = 8;
public static function newButton_standard( button_name:String, ?parent:Null<h2d.Object> ) : Interactive {
var bw : Float = 320;
var bh : Float = 32;
var b = newButton( bw, bh, button_name, parent );
b.y = yy; yy += 32; b.x += 8; // set correct position
return b;
}
public static function newButton( width:Float, height:Float, button_name:String, ?parent:Null<h2d.Object> ) : Interactive {
var b = new Interactive( width, height, parent );
var color_default = 0xFFb3b3b3;
var color_active = 0xFFd9d9d9;
b.backgroundColor = color_default;
b.onOut = function(e){
b.backgroundColor = color_default;
};
b.onOver = function(e){
b.backgroundColor = color_active;
};
var t = new h2d.Text( DefaultFont.get(), b ); // the text/label is child to the button/interactive
t.text = button_name;
t.textColor = 0xFFFFFF; // white
return b;
}
}