World: r3wp
[View] discuss view related issues
older newer | first last |
Volker 7-Aug-2005 [2148] | barebones of a button, one with behavior and simple look (two colors), another shows smart vid-arguments (all this "if color if effect" etc). |
Pekr 7-Aug-2005 [2149] | OK, then it really is question of documentation mainly, but still - if we can find good ways to make things more consistent, we should not hesitate to discuss them ... |
Volker 7-Aug-2005 [2150] | Right. And it helps. If you say "i like the pure OO way because of ..", i start saying "Noo, our way is better because of - because of - " and then i have to dig out something. Only that i always forget to make notes.. |
Rebolek 8-Aug-2005 [2151x2] | This is OK? |
>> 334x252 > 300x300 ** Script Error: Expected one of: pair! - not: pair! ** Near: 334x252 > 300x300 | |
Robert 8-Aug-2005 [2153x2] | Such a comparision doesn't make sense. So > shouldn't work for pair! (more specific for two pair!) |
So, the error message is a bit confusing. | |
[unknown: 10] 8-Aug-2005 [2155] | Is there a way to hide the mouse pointer in view when its over a face ? |
DideC 8-Aug-2005 [2156] | No one except playing with Win32 API (good luck) |
JaimeVargas 8-Aug-2005 [2157] | Maybe a good enhancement request. |
Graham 8-Aug-2005 [2158] | mouse pointer handler was previously announced http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlZNLK |
ChristianE 10-Aug-2005 [2159x2] | view center-face layout [ space 0x0 across sample: box 200x200 "ABC" font [name: "Arial Black" size: 48 offset: 0x0 align: 'left valign: 'top color: black shadow: none] para [origin: 0x0 margin: 0x0] edge [size: 1x1 effect: none color: black] pad -200 origin: box 200x200 edge [size: 1x1 effect: none color: black] with [color: none] pad -200 margin: box 200x200 edge [size: 1x1 effect: none color: black] with [color: none] return text 100 "font/offset:" sld_font.offset: slider 104x16 [ inf_font.offset/text: form sld_font.offset/user-data: to integer! 100 * sld_font.offset/data sample/font/offset: 1x1 * sld_font.offset/user-data show [inf_font.offset sample] ] inf_font.offset: info 60 return text 100 "para/origin:" sld_para.origin: slider 104x16 [ inf_para.origin/text: form sld_para.origin/user-data: to integer! 100 * sld_para.origin/data sample/para/origin: 1x1 * sld_para.origin/user-data origin/offset: sample/offset + sample/para/origin origin/size: sample/size - sample/para/origin show [inf_para.origin sample origin] ] inf_para.origin: info 60 return text 100 "para/margin:" sld_para.margin: slider 104x16 [ inf_para.margin/text: form sld_para.margin/user-data: to integer! 100 * sld_para.margin/data sample/para/margin: 1x1 * sld_para.margin/user-data margin/size: sample/size - sample/para/margin show [inf_para.margin sample margin] ] inf_para.margin: info 60 return text 100 "para/wrap?:" chk_para.wrap?: check on [ sample/para/wrap?: chk_para.wrap?/data show sample ] return ] |
Shouldn't changing FONT/OFFSET have an effect? I must be doing something seriously wrong, here ... | |
Anton 10-Aug-2005 [2161] | I don't think font/offset does anything since I can remember. |
james_nak 10-Aug-2005 [2162] | Hello y'all. Does anyone know how to correct the following? I have a "list" of toggle buttons in four columns. When I select one of them, any time I move my mouse, it will continue to select any button in the same column that the mouse pointer passes over. The same thing happens with text buttons. |
Henrik 10-Aug-2005 [2163] | show the code |
james_nak 10-Aug-2005 [2164] | my-list: list 247x300 [ across space 1x0 origin 0x0 style cell toggle 60x20 blue mint + 25 center middle [ either found? find selectedtimes face/text [ remove at selectedtimes index? find selectedtimes face/text head selectedtimes ] [append selectedtimes copy face/text ] ] c-1: cell cell cell cell ] supply [ count: count + ml-cnt item: pick data count face/text: either item [pick item index][none] ] sld: scroller 16x300 [ if ml-cnt <> (val: to-integer value * subtract length? data visible-rows) [ ml-cnt: val show my-list ] ] |
Henrik 10-Aug-2005 [2165] | hmm... now I'm learning again... what does 'supply do? :-) |
james_nak 10-Aug-2005 [2166] | It's supposed to fill in the face text data as View generates the buttons. |
Volker 10-Aug-2005 [2167] | faces with state do not work with list. because all the displayed faces are the same face internally, and share that state. if you change state of one, say toggling, all toggles have that state. |
Anton 10-Aug-2005 [2168] | Remember they are all one face, a face which is changing its position rapidly. Now look at the cell face's feel: layout [toggle with [?? feel]] In this code, if you see facets which are modified then those need to be stored and restored by the SUPPLY code. (ie. just like the list data goes to face/text.) But wait, let me look for an iterated checkbox example. |
Volker 10-Aug-2005 [2169] | if you need such toggles, its easier to make a big layout with a real face for each row. |
james_nak 10-Aug-2005 [2170x2] | Is there a way to generate buttons on the fly? I've often wondered about that. |
But thank you all, your explanations make sense. | |
Anton 10-Aug-2005 [2172] | do http://www.lexicon.net/antonr/rebol/gui/iterated/list-of-checks.r |
Volker 10-Aug-2005 [2173] | Yes there is. After all vid-styles are faces, and can be used at that level, means put in a face/pane. |
james_nak 10-Aug-2005 [2174] | Didier's delete-email.r has a text list that seems to work. I'll have to check to see what he is doing differently. |
Volker 10-Aug-2005 [2175] | the easiest way imho is to make the button in a layout and throw the layout away. layout/tight[my-button: button "test" [..]] and now you have a button in 'my-button, which you can use in another face/pane |
james_nak 10-Aug-2005 [2176] | Thanks all. |
Volker 10-Aug-2005 [2177] | Hmm, Antons way works too. He has all face-states extra in a block. In supply he puts it in the face, and in action-block, when it is changed, he puts that value back in the block. That could be used now with set-face/get-face with some styles. |
james_nak 10-Aug-2005 [2178] | I'll check that out. |
Anton 10-Aug-2005 [2179] | do http://www.lexicon.net/antonr/rebol/gui/iterated/list-of-toggles.r |
james_nak 10-Aug-2005 [2180] | Thanks Anton! |
[unknown: 10] 10-Aug-2005 [2181] | Cyphre, my compliments on the nice demos on your site... I like SWIS and the vconsole rocks :) |
Anton 11-Aug-2005 [2182x2] | James, cool. Hope it helped. Just uploaded improved version in which the list is more self-contained (not so many external variables lying around). |
(essentially the same.) More fiddling involved with a list of buttons, though. The button style feel must be modified to save the state when it changes in engage, such as when the mouse drags off the button (and then perhaps back on again.)... | |
james_nak 11-Aug-2005 [2184] | Thanks. I'll take a look at it. Man, how do you know this stuff? |
james_nak 12-Aug-2005 [2185] | Anton, I thought your example was superb. I started to adapt it to my "grid" of toggles but as usual I'm not thoroughly understanding what's going on and I can't make my 4 x 48 grid without the rows being the same toggle. |
[unknown: 10] 13-Aug-2005 [2186] | Is it or isnt it...the mouse-wheel in rebol..? looks not... |
Pekr 13-Aug-2005 [2187x3] | it is ... |
http://www.rebol.com/docs/view-system.html#section-5.10- look at scroll-line and scroll-page events ... | |
Some week or two ago someone posted kind of visual app to see even-flow ... maybe link could be reposted here, but dunno if it featured mouse wheel events .... | |
[unknown: 10] 13-Aug-2005 [2190] | Thanks... ! |
PhilB 13-Aug-2005 [2191] | You can process mouse wheel events in view .... AltMe does it for example .... I believe that the event type is .... event/type = 'scroll-line |
[unknown: 10] 13-Aug-2005 [2192] | Does anyone have a good performance with Rebol/view and i.e. Hummingbird Remote Desktop? Seems Rebol is quiet slow here where GTK GUI is flashing over my screen my Rebol gui's do need far more time.. Any hint of tip is welcome.. |
Graham 13-Aug-2005 [2193x2] | I previously used this for buttons with images : view layout [ button "Reply" 60 font [align: 'right] myimage effect [] ] but this doesn't work for btn view layout [ btn "Reply" 60 font [align: 'right] myimage effect [] ] |
myimage: load 64#{ R0lGODlhDwAMALMPAKnZ+P/yqvSs/83x/fnP//3kj/GT////9f/9zwAAAP//6eT3 /Hd8oUNJdvTReAAAACH5BAEAAA8ALAAAAAAPAAwAAARX8MnHap1YsnMUCkymKdzx FSHGIGR3JsnUBHRROHhCJGmzBp9AQbeDJRoDBqhCJAiexwWAsVg0nwLDcTo4VHVP g/hIrQ7Oiaxxewa43QltQ9Ko2++w+SMCADs= } | |
Chris 14-Aug-2005 [2195] | view layout [btn "Reply" 60 effect [extend draw [image 5x5 myimage]] para [origin: 20x2]] |
Graham 14-Aug-2005 [2196] | Kewl .. thanks. |
Anton 14-Aug-2005 [2197] | James, what do you want to do with your grid of toggles ? (sounds like could be used for an audio application, like drum patterns). Do you want them to have different texts and colors as well, etc. ? |
older newer | first last |