static IupHandle LabelText(string caption) { return(Iup.Hbox( Iup.Label(caption), Iup.Text(null), Iup.Button("...") ).SetAttributes("NGAP=4")); }
static void Main() { Iup.Open(); IupControls.Open(); IupGL.Open(); IupHandle button, bkbox; using (IupHandle dlg = Iup.Dialog( Iup.Vbox( LabelText("Namn:"), LabelText("Adress:"), LabelText("Gata:"), button = Iup.Button("OK") ).SetAttributes("ALIGNMENT=ARIGHT,NGAP=4") ) ) { //openitem.SetCallback ("K_cO", new CallbackKeyPressCB (OnKeyPress)); byte[] img = new byte[100 * 100 * 3]; img[10] = 25; IupHandle iupimg = Iup.ImageRGB(100, 100, img); var ep = Iup.ElementPropertiesDialog(button); ep.Show(); dlg.Show(); Iup.MainLoop(); } Iup.Close(); }
public Button(IupComposite parent, string title) : base(parent, Iup.Button(title)) { Handle.SetCallback("ACTION", new CBDefault((h) => { return(OnClick(h)); })); Handle.SetCallback("BUTTON_CB", new CBButton((h, btn, down, x, y, status) => { return(OnMouseUpDown(h, btn, down, x, y, status)); })); }