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

[REBOL] Re: Changing VID Styles

From: nitsch-lists:netcologne at: 12-Dec-2001 6:04

RE: [REBOL] Re: Changing VID Styles [Sanghabum--aol--com] wrote:
> Hi Volker, > > > > > > > I have a layout with a load of entry fields (VID style Field). I need to > > > occassionaly display this with all entry fields disabled. > <snip> > > > i expect you should change the complete feel, since this defines how > > a face reacts. > > > > for fields it should be: ctx-text/swipe > > for info it should be: ctx-text/edit > > > Thanks for the response. How do you learn this stuff? help ctx-text on my > machine starts an infinite molded print. >
o be a good vid-detective, one should look at vidface/facets and vid-face/style. BMX (by my experiments) 'facets is the part 'layout used to construct the face, and 'style the style its based on. thats a LOT fewer source :)
>> probe get in get-style 'info 'style
FIELD == FIELD
>> probe get in get-style 'info 'facets
[with [ colors: 180.180.180 feel: ctx-text/swipe ]] == [with [ colors: 180.180.180 feel: ctx-text/swipe ]]
> I've been thinking a bit more about my problem. And It gets more complicated. > I want to "freeze" check boxes, Choice boxes, and disable the "Save" button > and so forth. That's going to be a lot of work to set a display to "read > only". > > I've hit on another way that'll do the job for my application. The solution > is to display the layout as an image when read only. The crude code below is > a proof-of-concept. > > unview/all > DataWindow: layout/offset [field button > "Display only" > [DisplayBox/Image: make Image! MainPanel/Pane > DisplayBox/Size: DisplayBox/image/Size > MainPanel/Pane: DisplayPanel > Show MainPanel > ] > field button field > ] 0x0 > > view/new layout/offset [MainPanel: box 300x400] 0x0 > MainPanel/Pane: DataWindow > DisplayPanel: layout/offset [DisplayBox: box 300x400 > [] ; no left click > ;; Right click to "reactivate" > [ MainPanel/Pane: DataWindow > Show MainPanel > ] > ] 0x0 > > Show MainPanel > do-events
Cool :) but 'info allows copying of text, so maybe the feel-way is usefull? to block a face used once following: i placed a face in front of the original face, this gets now all mouse-events. the face was a filter, so the original face was darkend. a filter with color: font: para: text: data: image: none effect: [blur colorize 0.0.200] but i remember this with change in the future, http://www.escribe.com/internet/rebol/m15951.html then effect will be effect: [mergecolorize 200.0.0] now, could not resist trying it :) rebol [todo: {mark is-disabled somehow, seperate handling of field/info}] disable-face: func [face'] [ change find face'/parent-face/pane face' ( make-face/spec get-style 'image [ offset: face'/offset size: face'/size pane: reduce [ face' make system/words/face [ size: face'/size color: font: para: text: data: image: none effect: [colorize 200.0.0] ] ] ] ) face'/offset: 0x0 show face'/parent-face ] enable-face: func [face'] [ face': face'/parent-face face'/pane/1/offset: face'/offset change find face'/parent-face/pane face' face'/pane/1 show face'/parent-face ] view center-face lay: layout [ rotary "enable" "disable" [ either face/data = face/texts [ enable-face hidi ] [ disable-face hidi ] ] field "field1" hidi: field "hidi" field "field2" ]
> > Colin.
-Volker