Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: View Bug?
Pages: [1] Print
Author Topic: View Bug?  (Read 233 times)
prk
Newbie
*
Offline Offline

Posts: 2


View Profile
View Bug?
« on: April 23, 2008, 06:26:11 AM »

Hello,

hopefully someone can help me.
If the problem is silly I apologize in advance.

Here is the program:

;--------------------------------
bild: layout [
  b: button "OK!" blue [f]
]

f: func[][
   b/color: green
   show b
   print b/color
]

view bild
;--------------------------------

Now, if I click on the "OK!" button
print displays '0.255.0' for green
but the button remains blue!
Is this a bug or somehow my error?
I have tested this with both REBOL/View 2.7.6.3.1 and REBOL/View 1.3.2.3.
Any help is welcome.

Thanks!

Peter

Logged
Sunanda
Full Member
***
Offline Offline

Posts: 100


View Profile
Re: View Bug?
« Reply #1 on: April 23, 2008, 09:02:25 AM »

The BTN style is similar to the BUTTON style -- but it works.

Also, buttons have two colors (for UP and DOWN) so you may want to set both...Use the COLORS word, not COLOR:

This should work:
Code:
bild: layout [
  b: btn "OK!" blue [f]
]

f: func[][
   b/colors: reduce [green red]
   show b
   print b/color
]

unview/all
view bild
Logged
prk
Newbie
*
Offline Offline

Posts: 2


View Profile
Re: View Bug?
« Reply #2 on: April 23, 2008, 02:04:34 PM »

Hi Sunanda,

many thanks for the quick solution!

Peter
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: View Bug?
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 08, 2008, 02:47:48 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2245 Posts in 589 Topics by 2259 Members
Latest Member: edibritrava

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc