Confused about windows definition

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
mrclinker
Posts: 3
Joined: Tue Jul 14, 2009 5:15 pm

Confused about windows definition

Post 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
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Confused about windows definition

Post 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. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Confused about windows definition

Post 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. ;)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Confused about windows definition

Post by Rathinagiri »

Simple and neat solution Luis Vasquez. Thanks. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply