Page 1 of 1

Confused about windows definition

Posted: Wed Jul 22, 2009 5:16 pm
by mrclinker
Dear experts:

I have defined a "modal" window where I perform the basic maintenances tasks of a table (new, modify, last, first, delete, etc.). This is working fine.

I am having some compiling problems when I call a procedure and in this procedure I just want to obtain some data from the user, using the TextBox control. Do I need to define another window just to obtain this data? I do not want to close or lose my original window.

Thank you very much,

Mr. Clinker
Uruguay

Re: Confused about windows definition

Posted: Wed Jul 22, 2009 6:16 pm
by Rathinagiri
Hi Mr. Clinker,

New window need not be defined. Controls can be defined inside a procedure even though the window is defined in a different procedure previously.

Code: Select all

sample1.prg
# include "minigui.ch"
define window x at 0,0 width 100 height 100 modal
..............
end window
x.center
x.activate

sample2.prg
# include "minigui.ch"
declare window x
...........
define textbox t1
   row 10
   col 10
   width 80
   parent x
end textbox
......
So, even after the window is active, we can define a control. :)

Re: Confused about windows definition

Posted: Wed Jul 22, 2009 8:37 pm
by luisvasquezcl
Hi,
you can use Inputbox() too... see this

Function ReadData
local xVar := ""
xvar = Inputbox('Find','Input data to find', xVar)
Return xVar

regards,
Luis Vasquez.
PD. Excuse me my english i'm spanish speaking. ;)

Re: Confused about windows definition

Posted: Thu Jul 23, 2009 3:10 am
by Rathinagiri
Simple and neat solution Luis Vasquez. Thanks. :)