Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[ALLY] HELP about the dropdown list widget

From: etienne::alaurent::free::fr at: 12-Apr-2001 0:40

I made a mistake when I copied the new style for the dropdown list widget : the code of this widget is : dropdowns: stylize [ dropdown: text black white 100 edge [color: 110.120.130 size: 2x2 effect: 'ibevel] font [shadow: none] middle with [ list-lay: none show-arrow?: true rows: 4 size: 100x24 line-list: action: none list-data: copy [] dd-feel: make face/feel [ over: redraw: detect: none engage: func [face action event][ switch action [ time [if not face/state [face/blinker: not face/blinker]] down [face/state: on] alt-down [face/state: on] up [if face/state [face/show-dropdown] face/state: off] alt-up [if face/state [do-face-alt face none] face/state: off] over [face/state: on] away [face/state: off] ] show face ] ] arrow-button: does [ layout [ origin 0x0 arrow down [self/show-dropdown] edge [color: 110.120.130 size: 2x2 effect: 'ibevel] 128.128.128 14x20 ] ] show-dropdown: func [/local tl picked][ if not list-lay [ list-lay: layout [ origin 0x0 at 0x0 tl: text-list data self/list-data bold to-pair reduce [size/x rows * 15 + 4] self/font/color self/color [ self/data: self/text: value show list-lay wait 0:0:0.03 ; long enough to see selection hide-popup show self ] do [if picked: find self/list-data self/text [append clear tl/picked first picked]] ] list-lay/offset: to-pair reduce [self/offset/x self/offset/y + self/size/y] ] show-popup/window list-lay self/parent-face do-events/away list-lay do-face self self/data ] reset: does [list-lay: none] resize: does [ reset ; so list-pane will redraw at correct size {Reset if a change has been made to the data} size/x: max 32 size/x size/y: max 24 size/y either show-arrow? [ pane: arrow-button pane/offset: 0x0 pane/offset/x: self/size/x - arrow-button/size/x - 4 arrow-button/size/y: self/size/y ][pane: none] show self ] pane: none words: [data [new/list-data: second args next args] rows [new/rows: second args next args]] init: append copy init [ arrow-button: arrow-button resize self/feel: self/dd-feel ] ] ] The difference is in the show-dropdown func. It wasn't ;do-my-events/away list-lay but do-events/away list-lay It is this instruction witch can't be executed with the new Rebol/View version. And I am not enough frendly with the face feeling event association to make the changes. Thank you for any answer.