Hide window

Igor
2014-04-07
2014-04-10
  • Igor
    Igor
    2014-04-07

    Hi! Is it possible to do via oorexx?
    pseudo code

    main_window:
    child=createwindow(...) --+++ create child once! +++
    child~onclose=child_onclose
    btn1=createbutton(onclick1)
    ...
    main=createwindow(btn1,btn2,....)
    main~show

    onclick1:
    child~show
    return

    child_onclose:
    self~hide --+++ dont close but hide? +++
    return

    thanks!

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-07

      ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround a code snippet with "~~~~"?

      Well, you need to specify what you are talking about a little better.
      
      What are you using for your "create_window?"  Are you talking about an
      actual graphically window?  Or ... ?
      
      --
      Mark Miesfeld
      
      
      On Mon, Apr 7, 2014 at 11:41 AM, Igor <ingvaring@users.sf.net> wrote:
      
      > Hi! Is it possible to do via oorexx?
      > pseudo code
      >
      > main_window:
      > child=createwindow(...) --+++ create child once! +++
      > child~onclose=child_onclose
      > btn1=createbutton(onclick1)
      > ...
      > main=createwindow(btn1,btn2,....)
      > main~show
      >
      >
      > onclick1:
      > child~show
      > return
      >
      > child_onclose:
      > self~hide --+++ dont close but hide? +++
      > return
      >
      >
      >
      > thanks!
      >
      >
      > ---
      >
      > [Hide window](
      > https://sourceforge.net/p/oorexx/discussion/408477/thread/9642fcd6/?limit=25#8ab2
      > )
      >
      >
      > ---
      >
      > Sent from sourceforge.net because you indicated interest in <
      > https://sourceforge.net/p/oorexx/discussion/408477/>
      >
      > To unsubscribe from further messages, please visit <
      > https://sourceforge.net/auth/subscriptions/>
      >
      
       
  • Igor
    Igor
    2014-04-08

    itmainwindow = .mainwindow~new(aStem., "resources.h")
    ...
    itchildwindow = .child~new("child.rc", IDD_DIALOG1, dlgData., "resource.h")

    thnaks

     
    Last edit: Igor 2014-04-08
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      Sure, you can hide a window instead of closing it. But, you have to close
      it eventually, or your program won't end.

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    i wana hide only child window. when main application ends i close all child window.
    well i have main window (control panel) with 1 button. i have child (LOG window) with one listview control. when start main window, it starts child window in hide mode, and child window process reads external queue(real time stock prices) and insert it in listview. when user click on button (control panel) i show child window, when user close it i only hide it & process reading external queue not stop. thanks!

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      On Mon, Apr 7, 2014 at 9:49 PM, Igor ingvaring@users.sf.net wrote:

      i wana hide only child window. when main application ends i close all
      child window.
      well i have main window (control panel) with 1 button. i have child (LOG
      window) with one listview control. when start main window, it starts child
      window in hide mode, and child window process reads external queue(real
      time stock prices) and insert it in listview. when user click on button
      (control panel) i show child window, when user close it i only hide it &
      process reading external queue not stop. thanks!

      HI Igor,

      Yes, that is possible to do. Are you having trouble coding it, or are you
      okay now?

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    i would like notice that i want to do it with standart button close [X]. that is when user click close [X] button, the dialog hides not close.

    thanks Mark.

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      On Tue, Apr 8, 2014 at 10:53 AM, Igor ingvaring@users.sf.net wrote:

      i would like notice that i want to do it with standart button close [X].
      that is when user click close [X] button, the dialog hides not close.

      What you need to do, is to intercept the close, but not close. In your
      child window, add a close() method:

      ::method close unguarded

      self~hide
      return 0
      

      That is all it takes. Now you probably need to do some other house keeping
      in the main window. In the main window you need to keep a reference to the
      child window when you create it:

      itchildwindow = .child~new("child.rc", IDD_DIALOG1, dlgData., "resource.h")

      Then when you need to close the child window do:

      itChildWindow~close:super

      That will bypass the close() method in the child window and invoke its
      super class method to close the dialog.

      That should be all you need to do.

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    Thanks Mark, i thought the same. but i cant find in oodialog documentation that rcdialog has close method. i find only leaving method.

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      On Tue, Apr 8, 2014 at 11:38 AM, Igor ingvaring@users.sf.net wrote:

      Thanks Mark, i thought the same. but i cant find in oodialog documentation
      that rcdialog has close method. i find only leaving method.

      All dialogs have the close() method because it is a member of the base
      dialog. Each subclass lists only the methods that are new or over-ridden
      in the subclass.

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    may i ask You to show me in documentation it? i use oodialog 4.2.4 thanks a lot

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      Igor,

      I'm on a Linux system right now and don't have the documentation. For
      ooDialog 4.2.4, the second chapter is "The Dialog Object." In that chapter
      is a subsection: "Standard Event ..." I don't remember the exact wording.

      Then under standard event ... is the close method.

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    cancel,help,ok,leaving & validate. that is all

     
    • Mark Miesfeld
      Mark Miesfeld
      2014-04-08

      Sorry. ;-( I meant cancel() but was saying close() by mistake.

      Replace all my references to close() with cancel()

      --
      Mark Miesfeld

       
  • Igor
    Igor
    2014-04-08

    i afraid that oorexx has not close event handler

     
  • Igor
    Igor
    2014-04-09

    Mark THANK YOU VERY MUCH! that i need, of course i had read it, but i thought its default cancel method for cancel button! Thanks again!

     
  • Igor
    Igor
    2014-04-09

    ::method cancel unguarded; do
    self~hide
    return 0 --not return to main procedure
    end

     
  • Igor
    Igor
    2014-04-10

    i did, if interesting
    ...
    ::requires '.\REXX\LOGIT.rex'
    ...
    ::attribute itLOG_ public unguarded
    ::attribute itLOGM_ public unguarded
    ::method INIT;do
    ...
    self~itLOG_=.LOGIT~new(WHERE_WE'\REXX\RC\LOGIT.rc','IDD_LOG',P.,WHERE_WE'\REXX\RC\LOGIT.h')
    self~itLOGM_=self~itLOG_~popup("HIDE")
    end

    ::method ON_BUTTON_CLICK unguarded; use arg IDC, hwnd; do
    ...
    self~itLOG_~show('SHOWTOP')
    end
    ::method LEAVING unguarded; do
    self~newStatusBar('STATUS_BAR')~setText('leaving', 1)
    self~itLOG_~cancel('EXIT')
    end--method leaving

    logit.rex:
    ...
    ::method CANCEL unguarded;use arg P; do
    if P='EXIT' then do
    self~cancel:super
    say 'cancel'
    end
    else do
    self~hide
    return 1
    end
    end

    thats all! Mark thanks a lot!

     
    Last edit: Igor 2014-04-10