Thread Rating:
  • 318 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to know if Graphic object is being displayed?
10-27-2011, 04:48 PM,
#5
RE: How to know if Graphic object is being displayed?
Kind of like this:

Code:
{curl 7.0, 8.0 applet}

{def frame = {Frame}}
{def child1 = {Frame "Child1"}}
{def child2 = {Frame "Child2"}}
{def td =
    {TextDisplay
        {on AttachEvent do
            {td.animate
                interval = 1s,
                {on TimerEvent do
                    {if child1.display-context == null then
                        set td.value = "not displayed"
                     else
                        {if-non-null v = {child1.get-view} then
                            {switch v.visibility
                             case "minimized", "hidden" do
                                set td.value = "not displayed"
                             else
                                set td.value = "displayed"
                                {dump {DateTime}, "displayed!"}
                            }
                         else
                            set td.value = "not displayed"
                        }
                    }
                }
            }
        }
    }
}

{VBox
    frame,
    {HBox
        {CommandButton
            label="show child1",
            {on Action do
                {frame.add child1, replace?=true}
            }
        },
        {CommandButton
            label="show child2",
            {on Action do
                {frame.add child2, replace?=true}
            }
        }
    },
    td
}

Note that if you minimize the browser window, the console will stop showing the displayed message.
Reply


Messages In This Thread
RE: How to know if Graphic object is being displayed? - by c-s - 10-27-2011, 04:48 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  TLS通信下でCould not deserialize the object from Curl.発生 MIT 3 4,767 03-10-2017, 08:35 AM
Last Post: MIT
  Could not deserialize the object from Curl. umemura 4 6,641 04-11-2015, 04:45 AM
Last Post: Sumerjobs
  print-graphic-pdfに関して nmyzk 1 3,446 05-11-2012, 05:23 PM
Last Post: nmyzk
Tongue print-graphic-pdfプロシージャの仕様について 森口 慶紀 1 3,625 09-30-2011, 06:36 PM
Last Post: 森口 慶紀
Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('323')