[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Iterating through and enabling and
From:       sbungay <sbungay () csolve ! net>
Date:       2007-02-06 19:57:57
Message-ID: 45C8DDC5.9040605 () csolve ! net
[Download RAW message or body]

   Hi Fabien.
     I goofed on the semantics of the email. The form is enabled, it is 
the control in the form that is not enabled, having set Enabled=False at 
design time. The sentence;

 >>ControlHandle.Enabled = True doesn't set Enabled to True if the form 
 >>has Enabled set to False by default.

   Should actually read

 >>ControlHandle.Enabled = True doesn't set Enabled to True if the 
 >>control on the form had its' Enabled property set to False at design 
 >>time.

  Sorry for the confusion, thanks for the reply.

Steve.

Fabien Bodard wrote:
> 2007/2/6, Stephen Bungay <sbungay@csolve.net>:
> 
>>ControlHandle.Enabled = True doesn't set Enabled to True if the form has
>>Enabled set to False by default. However, if Enabled is set to True by
>>default then ControlHandle.Enabled can successfully toggle the value, thus
>>Disabling and Enabling the control. Is this a bug?
>>
>>' Iterate through the buttons on a form and Enable or Disable them
>>' depending on if their tag value exists in the SkillSet Collection.
>>PRIVATE SUB SetControlsState()
>>  DIM ControlHandle AS Control
>>  DIM X AS Integer
>>
>>  FOR EACH ControlHandle IN ME.Controls
>>      SELECT CASE Object.Type(ControlHandle)
>>             CASE "Button"
>>                  ' SkillSet is a collection.
>>                  FOR X = 1 TO ME.SkillSet.Count
>>                      IF CInt(ControlHandle.Tag) = ME.SkillSet[X].ID THEN
>>                         ControlHandle.Enabled = TRUE
>>                         ControlHandle.BackColor = Color.Green
>>                      ELSE
>>                         ControlHandle.Enabled = FALSE
>>                         ControlHandle.BackColor = Color.DarkGreen
>>                      END IF
>>                  NEXT
>>      END SELECT
>>  NEXT
>>END
> 
> 
> 
> In fact why do you want to enable a control when his container is not....
> it's not logical ! no ?
> 
> -------------------------------------------------------------------------
> 
>>Using Tomcat but need to do more? Need to support web services, security?
>>Get stuff done quickly with pre-integrated technology to make your job
>>easier.
>>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>_______________________________________________
>>Gambas-user mailing list
>>Gambas-user@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic