Re: setVisible on tab pages

new topic     » goto parent     » topic index » view thread      » older message » newer message

ZNorQ wrote:
> 
> Pete Lomax wrote:
> > 
> > On Thu, 28 Apr 2005 04:05:19 -0700, ZNorQ <guest at RapidEuphoria.com>
> > wrote:
> > 
> > I think you need additional tests around the setVisible call:
> > }}}
<eucode>
> > include win32lib.ew
> > constant main=create(Window,"Title",0,410,0,400,350,0)
> > constant
> > TabControl56=create(TabControl,"TabControl",main,32,30,200,283,0)
> > constant TabItem57=create(TabItem,"TabItem",TabControl56,0,0,0,0,0)
> > constant TabItem58=create(TabItem,"TabItem",TabControl56,0,0,0,0,0)
> > constant Label58=create(Label,"Label",TabItem57,26,44,169,20,0)
> > constant Button59=create(Button,"Button",main,277,69,75,30,0)
> > procedure bh(integer self, integer event, sequence params)
> > 	if self or event or sequence(params) then end if
> > 	if getTabItem(TabControl56)=TabItem57 then
> > 		setVisible(Label58,not isVisible(Label58))
> > 	end if
> > end procedure
> > setHandler(Button59,w32HClick,routine_id("bh"))
> > WinMain(main,Normal)
> > </eucode>
{{{

> > 
> > Regards,
> > Pete
> > 
> > 
> Pete,
> 
> First you really gotta explain the - 
> 
>   }}}
<eucode>if self or event or sequence(params) then end if</eucode>
{{{


Looks like somthing to eliminate warnings, it is probably better to
use }}}
<eucode>without warning</eucode>
{{{
.

> <font color="#330033"></font>
> <font color="#330033">What would this accomplish? As I understand it,
> </font><font color="#0000FF">procedure </font><font color="#00A033">"bh"
> </font><font color="#330033">will only</font>
> <font color="#330033">be executed when the button is clicked, alas there WILL
> be contents in</font>
> <font color="#330033">atleast two of those variables (self </font><font
> color="#0000FF">and </font><font color="#330033">event) - </font><font
> color="#0000FF">and </font><font color="#330033">probably params too?</font>
> <font color="#330033">Since there is nothing </font><font color="#0000FF">to
> </font><font color="#330033">be executed between </font><font
> color="#00A033">"then" </font><font color="#0000FF">and </font><font
> color="#00A033">"end if"</font><font color="#330033">, I really</font>
> <font color="#330033">don</font><font color="#00A033">'t get it - and even if
> there where code between "then" and "end if",</font>
> <font color="#330033">it would still be executed every </font><font
> color="#FF00FF">time</font><font color="#330033">, am I wrong? Please enlighten
> me! :D</font>
> <font color="#330033"></font>
> <font color="#330033">Anyway, I don</font><font color="#00A033">'t think your
> code would be sufficient, as we gotta consider</font>
> <font color="#330033">two criterias here - either is the </font><font
> color="#00A033">"general" </font><font color="#330033">tab in focus -
> </font><font color="#0000FF">or not</font><font color="#330033">. If it </font>
> <font color="#330033">is, I could use Derek</font><font color="#00A033">'s
> code to test this when the right conditions for the field to be visible is met.
> But if the "general" tab isn'</font><font color="#330033">t in focus,
> I</font><font color="#00A033">'d</font>
> <font color="#330033">have </font><font color="#0000FF">to </font><font
> color="#330033">wait till it is.. The control I</font><font color="#00A033">'m
> using to verify the conditions of</font>
> <font color="#330033">the field is a set of radio buttons (as childs of a
> group - which again is</font>
> <font color="#330033">a child of the form itself..) ONE of those radio buttons
> shows the field,</font>
> <font color="#330033">the rest hides it. So, </font><font color="#0000FF">if
> </font><font color="#330033">I press the radio button that hides it, but
> the</font>
> <font color="#330033">tab page isn</font><font color="#00A033">'t active - how
> would I go about showing it when the page is</font>
> <font color="#330033">activated (got focus) at a later stage? </font>
> <font color="#330033"></font>
> <font color="#330033">I guess I</font><font color="#00A033">'d have to combine
> it with a setHandler that activates when the user </font>
> <font color="#330033">clicks the </font><font color="#00A033">"general"
> </font><font color="#330033">tab too? Maybe throw in a variable that is either
> TRUE </font>
> <font color="#0000FF">or </font><font color="#330033">FALSE - depending on
> </font><font color="#0000FF">if </font><font color="#330033">the field is
> supposed </font><font color="#0000FF">to </font><font color="#330033">be shown
> </font><font color="#0000FF">or not</font><font color="#330033">?</font>
> <font color="#330033"></font>
> <font color="#330033">Don</font><font color="#00A033">'t know if
> I'</font><font color="#330033">m way off here, but thanks </font><font
> color="#0000FF">for </font><font color="#330033">the replies anyway.</font>
> <font color="#330033"></font>
> <font color="#330033">Kenneth / ZNorQ</font>
> <font color="#330033"></font>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu