|
|
Re: create widget_label on the frame line [message #94645 is a reply to message #94644] |
Thu, 03 August 2017 16:27   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 8/3/17 4:28 PM, superchromix wrote:
> On Thursday, August 3, 2017 at 5:57:10 PM UTC+2, mrO_o wrote:
>> Hello
>>
>> Inside the envi New widget is used.
>> like this:
>> http://imgur.com/a/P84Kp
>>
>> And I want to know how to create it?
>>
>> thanks and best regards
>
> wow those do look like interesting widgets... Devs? Further info?
>
The details of this would look different depending on the platform and
there are some ugly hacks here, but the basic premise can be done.
Result on Mac OS (probably the ugliest):
http://michaelgalloy.com/wp-content/uploads/2017/08/mg_widge t_label_demo.png
Code:
pro mg_widget_label_demo
compile_opt strictarr
tlb = widget_base(/column, xpad=5, ypad=5)
base = widget_base(tlb)
label = widget_label(base, value='Conversion Parameters', xoffset=5,
yoffset=0)
framed_base = widget_base(base, /column, frame=1, xoffset=0, yoffset=8)
content = widget_base(framed_base, xsize=300, ysize=300)
base = widget_base(tlb, /row, /base_align_center)
icon1 = widget_draw(base, xsize=20, ysize=20)
slider = widget_slider(base, xsize=150, /suppress_value)
icon2 = widget_draw(base, xsize=20, ysize=20)
text = widget_text(base, xsize=4, ysize=1, value='38')
widget_control, tlb, /realize
end
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|
Re: create widget_label on the frame line [message #94646 is a reply to message #94645] |
Thu, 03 August 2017 16:28   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 8/3/17 5:27 PM, Michael Galloy wrote:
> On 8/3/17 4:28 PM, superchromix wrote:
>> On Thursday, August 3, 2017 at 5:57:10 PM UTC+2, mrO_o wrote:
>>> Hello
>>>
>>> Inside the envi New widget is used.
>>> like this:
>>> http://imgur.com/a/P84Kp
>>>
>>> And I want to know how to create it?
>>>
>>> thanks and best regards
>>
>> wow those do look like interesting widgets... Devs? Further info?
>>
>
> The details of this would look different depending on the platform and
> there are some ugly hacks here, but the basic premise can be done.
>
> Result on Mac OS (probably the ugliest):
>
> http://michaelgalloy.com/wp-content/uploads/2017/08/mg_widge t_label_demo.png
>
>
> Code:
>
> pro mg_widget_label_demo
> compile_opt strictarr
>
> tlb = widget_base(/column, xpad=5, ypad=5)
>
> base = widget_base(tlb)
>
> label = widget_label(base, value='Conversion Parameters', xoffset=5,
> yoffset=0)
>
> framed_base = widget_base(base, /column, frame=1, xoffset=0, yoffset=8)
> content = widget_base(framed_base, xsize=300, ysize=300)
>
>
> base = widget_base(tlb, /row, /base_align_center)
>
> icon1 = widget_draw(base, xsize=20, ysize=20)
> slider = widget_slider(base, xsize=150, /suppress_value)
> icon2 = widget_draw(base, xsize=20, ysize=20)
> text = widget_text(base, xsize=4, ysize=1, value='38')
>
> widget_control, tlb, /realize
> end
And, of course, fill in those draw widgets with the icons of your choice.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|
Re: create widget_label on the frame line [message #94649 is a reply to message #94646] |
Fri, 04 August 2017 02:09   |
dashtabadi.m.r
Messages: 10 Registered: May 2016
|
Junior Member |
|
|
On Friday, August 4, 2017 at 3:55:00 AM UTC+4:30, Mike Galloy wrote:
> On 8/3/17 5:27 PM, Michael Galloy wrote:
>> On 8/3/17 4:28 PM, superchromix wrote:
>>> On Thursday, August 3, 2017 at 5:57:10 PM UTC+2, mrO_o wrote:
>>>> Hello
>>>>
>>>> Inside the envi New widget is used.
>>>> like this:
>>>> http://imgur.com/a/P84Kp
>>>>
>>>> And I want to know how to create it?
>>>>
>>>> thanks and best regards
>>>
>>> wow those do look like interesting widgets... Devs? Further info?
>>>
>>
>> The details of this would look different depending on the platform and
>> there are some ugly hacks here, but the basic premise can be done.
>>
>> Result on Mac OS (probably the ugliest):
>>
>> http://michaelgalloy.com/wp-content/uploads/2017/08/mg_widge t_label_demo.png
>>
>>
>> Code:
>>
>> pro mg_widget_label_demo
>> compile_opt strictarr
>>
>> tlb = widget_base(/column, xpad=5, ypad=5)
>>
>> base = widget_base(tlb)
>>
>> label = widget_label(base, value='Conversion Parameters', xoffset=5,
>> yoffset=0)
>>
>> framed_base = widget_base(base, /column, frame=1, xoffset=0, yoffset=8)
>> content = widget_base(framed_base, xsize=300, ysize=300)
>>
>>
>> base = widget_base(tlb, /row, /base_align_center)
>>
>> icon1 = widget_draw(base, xsize=20, ysize=20)
>> slider = widget_slider(base, xsize=150, /suppress_value)
>> icon2 = widget_draw(base, xsize=20, ysize=20)
>> text = widget_text(base, xsize=4, ysize=1, value='38')
>>
>> widget_control, tlb, /realize
>> end
>
> And, of course, fill in those draw widgets with the icons of your choice.
>
> Mike
> --
> Michael Galloy
> www.michaelgalloy.com
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
thanks a lot Michael Galloy.
I really appreciate your help.
|
|
|
|