limit textarea width (Motif)

5 weeks ago

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 06 Feb 2025 22:03:14 +0100 (5 weeks ago)
changeset 459
4ea4bb379273
parent 458
a39bd7d24104
child 460
1274d84f44de

limit textarea width (Motif)

ui/motif/Grid.c file | annotate | diff | comparison | revisions
ui/motif/text.c file | annotate | diff | comparison | revisions
--- a/ui/motif/Grid.c	Wed Feb 05 23:10:09 2025 +0100
+++ b/ui/motif/Grid.c	Thu Feb 06 22:03:14 2025 +0100
@@ -548,6 +548,8 @@
             Dimension actual_width, actual_height;
             w->mywidget.sizerequest = TRUE;
             
+            //printf("sizerequest: %d x %d\n", (int)req_width, (int)req_height);
+            
             //XtWidgetGeometry request;
             //request.width = req_width;
             //request.request_mode = CWWidth;
--- a/ui/motif/text.c	Wed Feb 05 23:10:09 2025 +0100
+++ b/ui/motif/text.c	Thu Feb 06 22:03:14 2025 +0100
@@ -49,6 +49,7 @@
     
     Widget parent = ctn->prepare(ctn, xargs, &n);
     char *name = args.name ? (char*)args.name : "textarea";
+    XtSetArg(xargs[n], XmNwidth, 100); n++;
     Widget widget = XmCreateScrolledText(parent, name, xargs, n);
     XtManageChild(widget);
     

mercurial