Re: [Iup-users] Two problems with matrix formatting.
A) Ok. Now I got it. Well I guess we need a new vertical alignment attribute to be able to do that. B) That's because the scrollbar can be hidden. If you set XAUTOHIDE=NO, it will display correctly. Best, Scuri On Mon, Jul 27, 2015 at 7:29 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Am 25.07.2015 um 16:08 schrieb Antonio Scuri: A) the problem is not alignment, but height of the line. Set the HEIGHTn attribute for the lines that have text with multiple lines. If my understanding the documentation is correct, than not giving of those attributes, I should end up using HEIGHTDEF. Thus one line. That's actually what I want. The idea was to see just the first line. Seems I'm seeing one line worth around the middle. B) the matrix configuration could cause that effect. Which attributes (not cell values) of the matrix are you using. expand: yes, limitexpand: yes, numlin: the number of lines in the matrix, numcol: 11, cursor ARROW, readonly: yes. ALIGNMENT1... ALIGNMENT3: ALEFT FONT*:2 and FONT*:3 : Monospace, 10 WITDH1 ...WIDTH11 : set to appropriate width for the column range 4..150 Thant's it. Scuri On Sat, Jul 25, 2015 at 5:15 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hi, I have two problems with matrix formatting. A) There is an attribute to control the horizontal alignment of matrix cells. But I did not find the equivalent for vertical alignment. The attached MultilineProblem.png shows how horrible content with embeded newlines ends up. (Here an excerpt of a sqlite_master table.) I should be able to work around this by cutting the matrix content on the first newline, or replace newlines with spaces. Though this looks would need to distinguish between actual content and content on display in the matrix. Thus complicating the app logic quite a bit. Is there any better solution? B) Worse is the behavior when a matrix horizontally exceeds size of the window, but not vertically. Iup correctly adds a horizontal scrollbar. However the scrollbar obstructs the last line of the matrix. The only way (I found) to view this data is to resize the window. (Which may be impossible for large enough a matrix.) I'm not sure what the right thing to do would be. Adding a vertical scrollbar is certainly at least required if the matrix would also exceed the vertical window size. Otherwise it might be wiser to simply try to recalculate the layout and increase the matrix's height. See the second attachment MatrixMissingVScroll Best /Jörg -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] A bag of questions.
Am 04.08.2015 um 04:06 schrieb Milind Gupta: I didn't understand your requirements fully. But are you trying to achieve something that the lua program below does: --IupDialog Example in IupLua --Creates a simple dialog. require( iuplua ) vbox = iup.vbox { iup.hbox{ iup.label {title=Label}, iup.text { border=NO; value=This is good; bgcolor=iup.GetGlobal(DLGBGCOLOR); readonly=YES; visiblecolumns=30 }; gap=10 } } dlg = iup.dialog{vbox; title=Dialog,size=QUARTERxQUARTER} dlg:show() if (iup.MainLoopLevel()==0) then iup.MainLoop() end This is essentially what I'm doing. Works OK for the simple case. Maybe except that I'm seeing borders around the iup.text, which is my first problem. The second is with the positioning. Using gridbox I'm trying to get the left column to make all of the widest label visible. But I can't figure out how to achieve that. I don't have to have gridbox there, but I'd prefer vertical alignment for the second column. The third is how to format the right hand side. Often it's short text too. But there is also long single line text, which could really benefit from word wrapping. And there is text with embedded newlines, which in turn needs to be displayed as is. It's easy to use different controls/arguments for each case. But so far all but the short text do strange things for me. On Mon, Aug 3, 2015 at 11:55 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hi, I'm trying to find a replacement formatting for what my current web app does using an html table. The table is simply two columns: a label in the left and value in the right column. I want/need it to look mostly like readable text, not so much like a separate GUI elements. At least the value side should allow to copy selected text into the clipboard. Initially I tried to do so using the label control. But there seems to be no way to enable the text selection copying I need. So I switched to use the textbox control. Somehow I can't get that right. readonly works, but the attempt to remove the border (by creating it with border=No) fails. It still has a border. Using multiline with a single line of text seems to create at least two lines for the control. Using wordwrap (which according to the docs would be something I want for my table) on it collapses it back to a single line but *adds* a scrollbar (for no reason I can see). Am I doing it all wrong? Is there a better way. E.g., using label or something else? Furthermore I tried to format the table using gridbox. I failed completely. Somehow I can't figure out how to tell the gridbox to expand the left column to fit the largest label. How would I do this? I tried FITTOCHILDREN=C0 Another idea was to use the width of the strings and calculate a propper minsize for the elements (labels) in the left column of the gridbox. But how would I do this? The length of the string does not match well to the actual width using proportional fonts. And I failed to find a way to compute the width I should use. Thanks /Jörg BTW: I'm using the GTK driver under Linux. -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] Two problems with matrix formatting.
Thanks :) Milind On Tue, Aug 4, 2015 at 12:54 PM, Antonio Scuri antonio.sc...@gmail.com wrote: Don't worry I didn't forget your request. :). Just popping out simpler tasks from the stack. Best, Scuri Em 04/08/2015 16:50, Milind Gupta milind.gu...@gmail.com escreveu: It will be really helpful I think if the scrollbars can be controlled to display and hide forcibly. Milind On Tue, Aug 4, 2015 at 5:44 AM, Antonio Scuri sc...@tecgraf.puc-rio.br wrote: A) Ok. Now I got it. Well I guess we need a new vertical alignment attribute to be able to do that. B) That's because the scrollbar can be hidden. If you set XAUTOHIDE=NO, it will display correctly. Best, Scuri On Mon, Jul 27, 2015 at 7:29 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Am 25.07.2015 um 16:08 schrieb Antonio Scuri: A) the problem is not alignment, but height of the line. Set the HEIGHTn attribute for the lines that have text with multiple lines. If my understanding the documentation is correct, than not giving of those attributes, I should end up using HEIGHTDEF. Thus one line. That's actually what I want. The idea was to see just the first line. Seems I'm seeing one line worth around the middle. B) the matrix configuration could cause that effect. Which attributes (not cell values) of the matrix are you using. expand: yes, limitexpand: yes, numlin: the number of lines in the matrix, numcol: 11, cursor ARROW, readonly: yes. ALIGNMENT1... ALIGNMENT3: ALEFT FONT*:2 and FONT*:3 : Monospace, 10 WITDH1 ...WIDTH11 : set to appropriate width for the column range 4..150 Thant's it. Scuri On Sat, Jul 25, 2015 at 5:15 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hi, I have two problems with matrix formatting. A) There is an attribute to control the horizontal alignment of matrix cells. But I did not find the equivalent for vertical alignment. The attached MultilineProblem.png shows how horrible content with embeded newlines ends up. (Here an excerpt of a sqlite_master table.) I should be able to work around this by cutting the matrix content on the first newline, or replace newlines with spaces. Though this looks would need to distinguish between actual content and content on display in the matrix. Thus complicating the app logic quite a bit. Is there any better solution? B) Worse is the behavior when a matrix horizontally exceeds size of the window, but not vertically. Iup correctly adds a horizontal scrollbar. However the scrollbar obstructs the last line of the matrix. The only way (I found) to view this data is to resize the window. (Which may be impossible for large enough a matrix.) I'm not sure what the right thing to do would be. Adding a vertical scrollbar is certainly at least required if the matrix would also exceed the vertical window size. Otherwise it might be wiser to simply try to recalculate the layout and increase the matrix's height. See the second attachment MatrixMissingVScroll Best /Jörg -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users
Re: [Iup-users] Two problems with matrix formatting.
It will be really helpful I think if the scrollbars can be controlled to display and hide forcibly. Milind On Tue, Aug 4, 2015 at 5:44 AM, Antonio Scuri sc...@tecgraf.puc-rio.br wrote: A) Ok. Now I got it. Well I guess we need a new vertical alignment attribute to be able to do that. B) That's because the scrollbar can be hidden. If you set XAUTOHIDE=NO, it will display correctly. Best, Scuri On Mon, Jul 27, 2015 at 7:29 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Am 25.07.2015 um 16:08 schrieb Antonio Scuri: A) the problem is not alignment, but height of the line. Set the HEIGHTn attribute for the lines that have text with multiple lines. If my understanding the documentation is correct, than not giving of those attributes, I should end up using HEIGHTDEF. Thus one line. That's actually what I want. The idea was to see just the first line. Seems I'm seeing one line worth around the middle. B) the matrix configuration could cause that effect. Which attributes (not cell values) of the matrix are you using. expand: yes, limitexpand: yes, numlin: the number of lines in the matrix, numcol: 11, cursor ARROW, readonly: yes. ALIGNMENT1... ALIGNMENT3: ALEFT FONT*:2 and FONT*:3 : Monospace, 10 WITDH1 ...WIDTH11 : set to appropriate width for the column range 4..150 Thant's it. Scuri On Sat, Jul 25, 2015 at 5:15 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hi, I have two problems with matrix formatting. A) There is an attribute to control the horizontal alignment of matrix cells. But I did not find the equivalent for vertical alignment. The attached MultilineProblem.png shows how horrible content with embeded newlines ends up. (Here an excerpt of a sqlite_master table.) I should be able to work around this by cutting the matrix content on the first newline, or replace newlines with spaces. Though this looks would need to distinguish between actual content and content on display in the matrix. Thus complicating the app logic quite a bit. Is there any better solution? B) Worse is the behavior when a matrix horizontally exceeds size of the window, but not vertically. Iup correctly adds a horizontal scrollbar. However the scrollbar obstructs the last line of the matrix. The only way (I found) to view this data is to resize the window. (Which may be impossible for large enough a matrix.) I'm not sure what the right thing to do would be. Adding a vertical scrollbar is certainly at least required if the matrix would also exceed the vertical window size. Otherwise it might be wiser to simply try to recalculate the layout and increase the matrix's height. See the second attachment MatrixMissingVScroll Best /Jörg -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users -- ___ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users