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

2015-08-11 Thread Jörg F. Wittenberger
Am 10.08.2015 um 19:11 schrieb Antonio Scuri:
>   In the GTK IUP driver what I do is to simply
> call gtk_scrolled_window_set_shadow_type when MULTILINE=Yes,
> and gtk_entry_set_has_frame when multiline=no.
> 
>   It is just that the border support. This could be a behavior depending on
> the GTK installation or theme.

This seems to be the cause.

>   You can check the GTK IUP is using with the GTKVERSION global attribute.

That's 2.24.25 here under Iup 3.15 (and I'm not sure that there is
already gtk 3 available in the debian stable I'm running on my ARM).

Thomas tried the very same code I ran linked against gtk 3.10 libgtk
2.24 on Mint 17.2 x86 Iup 3.14.  Different results: border works as
expected but the button placement is suboptimal.  (See attached.)

Best

/Jörg


> Best,
> Scuri
> 
> 
> 
> On Sat, Aug 8, 2015 at 10:05 AM, "Jörg F. Wittenberger" <
> joerg.wittenber...@softeyes.net> wrote:
> 
>> Sorry, I just re-read what I posted here.
>>
>> There is a bug in the picture I attached, while the text of the message
>> is correct: the right single line IupText had border=No - just as the
>> single line text claims.
>>
>> The multiline text in the attached picture above however wrongly claims
>> that both the single lines would have border=Yes.  That a mistake of mine.
>>
>> Am 08.08.2015 um 08:32 schrieb "Jörg F. Wittenberger":
>>> Am 07.08.2015 um 23:04 schrieb Milind Gupta:
 Multiline is no by default so border worked for the code I sent. Is your
 code in lua? Can you send a sample case showing the problem. That will
>> be
 the best way to fix it quickly if others can replicate it.
>>>
>>> It's not in Lua.  I'm using the Chicken-bindings.  So it's either
>>> compiled to C or interpreted.  (Doesn't make a difference.)
>>>
>>> Attached a screen shot showing the situation.
>>>
>>> You can see: the multiline text has no border.  The left hand single
>>> line text has a border as requested.  The right hand text, which was
>>> created with border=No, however does not have the additional padding
>>> around the text (which is good) but still has the border as a darker
>>> line around the text area.
>>>
>>> The second attachment is the same with the bgcolor set to global
>>> dlgbgcolor to make the line more obvious.
>>>
>>> Regards
>>>
>>> /Jörg
>>>
>>>
 Milind
 On Aug 7, 2015 1:42 PM, Jörg F. Wittenberger <
 joerg.wittenber...@softeyes.net> wrote:

> 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-10 Thread Antonio Scuri
  In the GTK IUP driver what I do is to simply
call gtk_scrolled_window_set_shadow_type when MULTILINE=Yes,
and gtk_entry_set_has_frame when multiline=no.

  It is just that the border support. This could be a behavior depending on
the GTK installation or theme.

  You can check the GTK IUP is using with the GTKVERSION global attribute.

Best,
Scuri



On Sat, Aug 8, 2015 at 10:05 AM, "Jörg F. Wittenberger" <
joerg.wittenber...@softeyes.net> wrote:

> Sorry, I just re-read what I posted here.
>
> There is a bug in the picture I attached, while the text of the message
> is correct: the right single line IupText had border=No - just as the
> single line text claims.
>
> The multiline text in the attached picture above however wrongly claims
> that both the single lines would have border=Yes.  That a mistake of mine.
>
> Am 08.08.2015 um 08:32 schrieb "Jörg F. Wittenberger":
> > Am 07.08.2015 um 23:04 schrieb Milind Gupta:
> >> Multiline is no by default so border worked for the code I sent. Is your
> >> code in lua? Can you send a sample case showing the problem. That will
> be
> >> the best way to fix it quickly if others can replicate it.
> >
> > It's not in Lua.  I'm using the Chicken-bindings.  So it's either
> > compiled to C or interpreted.  (Doesn't make a difference.)
> >
> > Attached a screen shot showing the situation.
> >
> > You can see: the multiline text has no border.  The left hand single
> > line text has a border as requested.  The right hand text, which was
> > created with border=No, however does not have the additional padding
> > around the text (which is good) but still has the border as a darker
> > line around the text area.
> >
> > The second attachment is the same with the bgcolor set to global
> > dlgbgcolor to make the line more obvious.
> >
> > Regards
> >
> > /Jörg
> >
> >
> >> Milind
> >> On Aug 7, 2015 1:42 PM, Jörg F. Wittenberger <
> >> joerg.wittenber...@softeyes.net> wrote:
> >>
> >>> 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
>
>
--
___
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-08 Thread Jörg F. Wittenberger
Sorry, I just re-read what I posted here.

There is a bug in the picture I attached, while the text of the message
is correct: the right single line IupText had border=No - just as the
single line text claims.

The multiline text in the attached picture above however wrongly claims
that both the single lines would have border=Yes.  That a mistake of mine.

Am 08.08.2015 um 08:32 schrieb "Jörg F. Wittenberger":
> Am 07.08.2015 um 23:04 schrieb Milind Gupta:
>> Multiline is no by default so border worked for the code I sent. Is your
>> code in lua? Can you send a sample case showing the problem. That will be
>> the best way to fix it quickly if others can replicate it.
> 
> It's not in Lua.  I'm using the Chicken-bindings.  So it's either
> compiled to C or interpreted.  (Doesn't make a difference.)
> 
> Attached a screen shot showing the situation.
> 
> You can see: the multiline text has no border.  The left hand single
> line text has a border as requested.  The right hand text, which was
> created with border=No, however does not have the additional padding
> around the text (which is good) but still has the border as a darker
> line around the text area.
> 
> The second attachment is the same with the bgcolor set to global
> dlgbgcolor to make the line more obvious.
> 
> Regards
> 
> /Jörg
> 
> 
>> Milind
>> On Aug 7, 2015 1:42 PM, Jörg F. Wittenberger <
>> joerg.wittenber...@softeyes.net> wrote:
>>
>>> 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
Am 07.08.2015 um 23:04 schrieb Milind Gupta:
> Multiline is no by default so border worked for the code I sent. Is your
> code in lua? Can you send a sample case showing the problem. That will be
> the best way to fix it quickly if others can replicate it.

It's not in Lua.  I'm using the Chicken-bindings.  So it's either
compiled to C or interpreted.  (Doesn't make a difference.)

Attached a screen shot showing the situation.

You can see: the multiline text has no border.  The left hand single
line text has a border as requested.  The right hand text, which was
created with border=No, however does not have the additional padding
around the text (which is good) but still has the border as a darker
line around the text area.

The second attachment is the same with the bgcolor set to global
dlgbgcolor to make the line more obvious.

Regards

/Jörg


> Milind
> On Aug 7, 2015 1:42 PM, Jörg F. Wittenberger <
> joerg.wittenber...@softeyes.net> wrote:
> 
>> 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 Milind Gupta
Multiline is no by default so border worked for the code I sent. Is your
code in lua? Can you send a sample case showing the problem. That will be
the best way to fix it quickly if others can replicate it.

Milind
On Aug 7, 2015 1:42 PM, Jörg F. Wittenberger <
joerg.wittenber...@softeyes.net> wrote:

> 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
>
--
___
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
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 Antonio Scuri
  Hi,

  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.

  FITTOCHILDREN=C0 on the other hand, works after the layout has been
calculated at least 1 time. So it is useless to set it on element creation.
In the Milind example, if you replace both boxes by a gridbox then you
could do:

iup.Refresh(dlg)
gbox.fittochildren="C0"
dlg:show()

  And you can also try IupMatrix/IupMatrixEx.

Best,
Scuri


On Tue, Aug 4, 2015 at 4:15 AM, "Jörg F. Wittenberger" <
joerg.wittenber...@softeyes.net> wrote:

> 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-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