Created
November 3, 2018 22:59
-
-
Save nedzadarek/08a1dd355eb36ada87ac15759392b48c to your computer and use it in GitHub Desktop.
When you click text list sometimes it disappear.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red[] | |
l: layout[ | |
do [ | |
number-of-colors: 0 | |
select-data: function [ | |
list | |
] [ | |
select list/data to-string list/selected | |
] | |
] | |
color-list: text-list data [] on-change [ | |
print 'color-list-changed | |
color-list-preview/color: s: select-data color-list | |
color-tab-red/data: s/1 | |
color-tab-blue/data: s/2 | |
color-tab-green/data: s/3 | |
] | |
color-list-preview: base red 100x30 | |
panel [ | |
text "Red" | |
color-tab-red: field on-change [ | |
print 'color-tab-red-changed | |
probe _h: find/tail color-list/data (to-string color-list/selected) | |
probe _h/1/1 | |
probe _h/1/1: color-tab-red/data | |
probe color-list/data | |
; show color-list | |
] | |
return | |
text "Blue" | |
color-tab-blue: field | |
return | |
text "Green" | |
color-tab-green: field | |
] | |
panel [ | |
style _b: button 120 | |
_b "add color" [ | |
number-of-colors: number-of-colors + 1 | |
append color-list/data reduce [ | |
to-string number-of-colors | |
0.0.0 | |
] | |
] return | |
] | |
] | |
view/no-wait l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment