Re: [Iup-users] A bag of questions.

2015-08-07 Thread Jörg F. Wittenberger
More Info:

I've got a text without a border - as I want it.  It works for
multiline=yes.  Seems that only the combination of multiline=No and
border=No is not working for me.

Am 04.08.2015 um 17:00 schrieb Antonio Scuri:
   I just tested BORDER under Windows, GTK2 (Ubuntu 10) and GTK3 (Ubuntu
 14). And they all work fine. But notice that border is a creation only
 attribute, so it must be set before mapping into the native system. The
 Milind example does that.


--
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] A bag of questions.

2015-08-07 Thread Jörg F. Wittenberger
I just tripple-checked my code, it never tries to change the border
after mapping.  Only right after creation.  Even before requesting
multiline=yes - which works.  (Debian, gtk2)

So the problem must be something else.  But how to nail it?

/Jörg

Am 04.08.2015 um 17:00 schrieb Antonio Scuri:
   I just tested BORDER under Windows, GTK2 (Ubuntu 10) and GTK3 (Ubuntu
 14). And they all work fine. But notice that border is a creation only
 attribute, so it must be set before mapping into the native system. The
 Milind example does that.


--
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] A bag of questions.

2015-08-04 Thread Jörg F. Wittenberger
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] A bag of questions.

2015-08-03 Thread 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


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