[Do...] Posted October 23 Share Posted October 23 Hallo zusammen, in einem Dialog verwende ich ein Texteingabefeld, dessen Größe sich leider nicht wie gewünscht anpassen lässt. Weder das vertikale Verbinden von Zellen noch die Definition von Absätzen über das Attribut „rows“ im Code führen zu einer Vergrößerung des Feldes. Bei der Eingabe längerer Texte wird kein automatischer Zeilenumbruch erzeugt, und das Feld wächst nicht mit dem Inhalt mit. Stattdessen wird der Text einfach weitergeschrieben und nach links hinausgeschoben, was die Lesbarkeit und Übersichtlichkeit stark beeinträchtigt. Auch in der App Development Documentation konnte ich hierzu keine hilfreichen Informationen finden. Dass eine größere Darstellung jedoch grundsätzlich möglich ist, zeigt der Systemdialog „Supportdaten zusammenstellen“, der ein entsprechend angepasstes Texteingabefeld verwendet. Meine Frage: Wie kann ich das Texteingabefeld standardmäßig vergrößern, sodass es auch bei längeren Texten übersichtlich bleibt und Absätze korrekt dargestellt werden? RESULT=gom.script.sys.execute_user_defined_dialog (dialog={ "content": [ [ { "columns": 1, "data": "AAAAAA==", "file_name": "", "height": 0, "keep_aspect": True, "keep_original_size": True, "name": "image", "rows": 1, "system_image": "system_message_question", "tooltip": { "id": "", "text": "", "translatable": True }, "type": "image", "use_system_image": True, "width": 0 }, { "columns": 1, "name": "input_1", "password": False, "read_only": False, "rows": 1, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "input::string", "value": "dsadasasasasasasasasasasasasasasasassddassdssd" } ] ], "control": { "id": "OkCancel" }, "embedding": "always_toplevel", "position": "center", "size": { "height": 223, "width": 239 }, "sizemode": "fixed", "style": "", "title": { "id": "", "text": "Dialogtitel", "translatable": True } }) Link to comment Share on other sites More sharing options...
[Ma...] Posted October 23 Share Posted October 23 I found that if you export that ".dlg" file, edit "with", then it will stay like that if you have "fixed" sizemode. If you want to show multiline, then use "continuous text" which can only show text, but you can check word wrap. Link to comment Share on other sites More sharing options...
[Ma...] Posted October 28 Share Posted October 28 Hi, Another option could be the use of spacers: If you place a horizontal spacer with a certain minimum width in the same column as the text widget, both widgets will be resized accordingly. If you place a vertical spacer with a certain minimum height in the same row as the text widget, both widgets will be resized accordingly. You can use a horizontal and a vertical spacer to achieve a minimum size of your text widget in both directions. The spacers are not visible in the resulting dialog. Best regards, Matthias Link to comment Share on other sites More sharing options...
[Ma...] Posted October 28 Share Posted October 28 Also today i found "Log" element. It allows you to write multiline text. Perhaps this will help too. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in