Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10346 > unrolled thread

Dispatch: checkbox to control other checkbox

Started bybeerhand <michael_j_schmidt@yahoo.de>
First post2017-03-25 02:00 -0700
Last post2017-03-26 00:29 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Dispatch: checkbox to control other checkbox beerhand <michael_j_schmidt@yahoo.de> - 2017-03-25 02:00 -0700
    Re: Dispatch: checkbox to control other checkbox katercamille8@gmail.com - 2017-03-25 02:16 -0700
    Re: Dispatch: checkbox to control other checkbox nk <n.kolb@aon.at> - 2017-03-25 10:27 +0100
    Re: Dispatch: checkbox to control other checkbox beerhand <michael_j_schmidt@yahoo.de> - 2017-03-25 03:17 -0700
      Re: Dispatch: checkbox to control other checkbox beerhand <michael_j_schmidt@yahoo.de> - 2017-03-26 00:29 -0700

#10346 — Dispatch: checkbox to control other checkbox

Frombeerhand <michael_j_schmidt@yahoo.de>
Date2017-03-25 02:00 -0700
SubjectDispatch: checkbox to control other checkbox
Message-ID<b2ce6910-eb1f-492e-aced-eb8604001a99@googlegroups.com>
Hi all,

I want to implement the following scenario: I have 2 checkboxes. The first is enabled the other is disabled. In case the first is checked/True I want to enable the second checkbox. And backwards: if first is unchecked/False I want to disable the second Checkbox. 

I searched the group and could only find the EditChange method. I think this works only for SingelEdit Control and is not applicable for Checkboxes. 

As far as I investigated I need to write my own Dispatch Method. In the WIN32 API I can find a lot of key words in the container. Does anyone know what is the relevant key word for Checkbox:checked that I need to use in the dispatch method?


***************************************
Method dispatch (oEvent) class myWindow

If oEvent:Message = "Checkbox1:checked" <-   ????????
         
        Do Case
           Case checkbox1:checked =.T.
                checkbox2:Enable()
           Case checkbox2:checked =.F.
                checkbox2:Disable()
Endif
***************************************
I assume it is more complicated as described above.

Last but not least: It seems that many "legacy" VO websites disappeared where i could find examples in the past. I still have a book from Ivo Wessel but no access to his examples. Are there still any websites available?

I also see quite a few posts about bbrowser - is this available for VO 2.6 (for free :-))


Best Michael

[toc] | [next] | [standalone]


#10347

Fromkatercamille8@gmail.com
Date2017-03-25 02:16 -0700
Message-ID<178a041e-10c9-46d9-a5db-cd3aca6d720e@googlegroups.com>
In reply to#10346
Hi Michael,

Instead of a dispatch-method use the buttonclick-method.

Camille

On Saturday, March 25, 2017 at 10:00:03 AM UTC+1, beerhand wrote:
> Hi all,
> 
> I want to implement the following scenario: I have 2 checkboxes. The first is enabled the other is disabled. In case the first is checked/True I want to enable the second checkbox. And backwards: if first is unchecked/False I want to disable the second Checkbox. 
> 
> I searched the group and could only find the EditChange method. I think this works only for SingelEdit Control and is not applicable for Checkboxes. 
> 
> As far as I investigated I need to write my own Dispatch Method. In the WIN32 API I can find a lot of key words in the container. Does anyone know what is the relevant key word for Checkbox:checked that I need to use in the dispatch method?
> 
> 
> ***************************************
> Method dispatch (oEvent) class myWindow
> 
> If oEvent:Message = "Checkbox1:checked" <-   ????????
>          
>         Do Case
>            Case checkbox1:checked =.T.
>                 checkbox2:Enable()
>            Case checkbox2:checked =.F.
>                 checkbox2:Disable()
> Endif
> ***************************************
> I assume it is more complicated as described above.
> 
> Last but not least: It seems that many "legacy" VO websites disappeared where i could find examples in the past. I still have a book from Ivo Wessel but no access to his examples. Are there still any websites available?
> 
> I also see quite a few posts about bbrowser - is this available for VO 2.6 (for free :-))
> 
> 
> Best Michael

[toc] | [prev] | [next] | [standalone]


#10348

Fromnk <n.kolb@aon.at>
Date2017-03-25 10:27 +0100
Message-ID<ob5d6q$1cd4$1@gioia.aioe.org>
In reply to#10346
Hi Michael,

Window:ButtonClick() Method
is your friend. There is a sample in the help-file.

Norbert

[toc] | [prev] | [next] | [standalone]


#10349

Frombeerhand <michael_j_schmidt@yahoo.de>
Date2017-03-25 03:17 -0700
Message-ID<1ee89624-6b02-42df-ad31-f7b87cc275cc@googlegroups.com>
In reply to#10346
Am Samstag, 25. März 2017 10:00:03 UTC+1 schrieb beerhand:
> Hi all,
> 
> I want to implement the following scenario: I have 2 checkboxes. The first is enabled the other is disabled. In case the first is checked/True I want to enable the second checkbox. And backwards: if first is unchecked/False I want to disable the second Checkbox. 
> 
> I searched the group and could only find the EditChange method. I think this works only for SingelEdit Control and is not applicable for Checkboxes. 
> 
> As far as I investigated I need to write my own Dispatch Method. In the WIN32 API I can find a lot of key words in the container. Does anyone know what is the relevant key word for Checkbox:checked that I need to use in the dispatch method?
> 
> 
> ***************************************
> Method dispatch (oEvent) class myWindow
> 
> If oEvent:Message = "Checkbox1:checked" <-   ????????
>          
>         Do Case
>            Case checkbox1:checked =.T.
>                 checkbox2:Enable()
>            Case checkbox2:checked =.F.
>                 checkbox2:Disable()
> Endif
> ***************************************
> I assume it is more complicated as described above.
> 
> Last but not least: It seems that many "legacy" VO websites disappeared where i could find examples in the past. I still have a book from Ivo Wessel but no access to his examples. Are there still any websites available?
> 
> I also see quite a few posts about bbrowser - is this available for VO 2.6 (for free :-))
> 
> 
> Best Michael

Wow, that simple. 
Thanks Norbert & Camille

[toc] | [prev] | [next] | [standalone]


#10350

Frombeerhand <michael_j_schmidt@yahoo.de>
Date2017-03-26 00:29 -0700
Message-ID<f5e28b2c-dd86-452e-820a-9239dd53676f@googlegroups.com>
In reply to#10349
Am Samstag, 25. März 2017 11:27:55 UTC+1 schrieb Johan Nel:
> Michael,
>     
> Here is a buttonclick method that I use on all my Edit forms:
>     
> METHOD ButtonClick(oBCE) CLASS DDE_SqlEditBase
> 
>           LOCAL oControl AS Control
> 
>           LOCAL wCntrlPos AS WORD
> 
>       
> 
>           SUPER:ButtonClick( oBCE )
> 
>       
> 
>           oControl := oBCE:Control
> 
>           
> 
>           IF (wCntrlPos := AScan(SELF:aControls, {|oCntrl|
>       oCntrl:NameSym == oControl:NameSym})) > 0 ;
> 
>               .and. IsInstanceOf(oControl, #ODI_PB) .and.
>       !(oControl:Block == NULL_OBJECT)
> 
>                   oControl:Block:Eval(oBCE, SELF) 
> 
>           ELSEIF IsInstanceOf(oControl, #ODI_CHECKBOX)
> 
>               // Here is where you write your code to enable/disable
>       other Controls dependent on the checkbox.
> 
>           ELSEIF  IsMethod(SELF, oControl:NameSym)
> 
>               Send(SELF, oControl:NameSym, oBCE, SELF)  // There is a
>       method with the same name as the Control
> 
>           ELSE
> 
>               IF wCntrlPos > 0
> 
>                   SELF:aControls[ wCntrlPos ]:Disable()
> 
>               ENDIF
> 
>               ErrorBox{SELF, 'Unknow button action : ' +
>       oControl:Name}:Show()
> 
>           ENDIF
>     
> Regards,
> 
>     
>     -- 
> 
>     
> Johan Nel
> 
>       George, South Africa
> 
>     
>   
> 
> 
> 
> 
> 
> 	
> 		
> 			
> 				
> 			
> 		
> 		
> 			
> 
> 				This email has been checked for viruses by Avast antivirus software.
> 				
> www.avast.com

Thanks Johan

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web