Page 1 of 3

Dynamic Controls - a good idea

Posted: Mon May 30, 2016 7:47 am
by brunellopulix
Hello guys

I'm sorry but I do not speak English all is translated with Google.

Long ago in Visual Object I had developed a library to create dynamic controls. It worked so well that I wanted to repeat in HMG.
After three years of fine-tuning and adjustments I can be said to be satisfied.
I am sure that someone will be useful and again through I decided to share it.
It states that the library does not contain all the HMG controls but only the most common ones.
I was used for supporting a remarkable program.

advantages:
-is all HMG
-you can add in your programs or you can add it to your programs
-you just have to connect KForm3.prg into your .hbp
-try moving a control line change unless you do not have to recalculate the position

for more complex applications can continue to write code with HMG

The windows are considered Main and Modal.
You can use the memory variable or field names not together. (see Dbf tests)

Let me illustrate:

FV3_OpenMain('This a Main Window')
FV3_Show()

without controls window is resized by default to 400w and 300h


FV3_OpenModal('Empty Window')
FV3_Show()
FV3_Result() / * always indicated except for main window * /

Does this:
Modal0.JPG
Modal0.JPG (5.19 KiB) Viewed 5590 times
this:
FV3_OpenModal('Empty Window')
FV3_Show(2)
IF FV3_Result() / * always indicated except for main window * /
// OK button pressed
Endif

Does this:

Modal2.JPG
Modal2.JPG (5.65 KiB) Viewed 5590 times

Remember that you have to try to do tests with small steps until you understand how it works.

regards
Brunello

Re: Dynamic Controls - a good idea

Posted: Mon May 30, 2016 10:11 am
by serge_girard
Thanks for sharing, Brunello !!

Serge

Re: Dynamic Controls - a good idea

Posted: Mon May 30, 2016 11:35 am
by danielmaximiliano
Gracias por compartir Bunello

Re: Dynamic Controls - a good idea

Posted: Mon May 30, 2016 11:46 am
by serge_girard
Brunello,

How does the RTFbox work? Do you have an example?

Serge

Re: Dynamic Controls - a good idea

Posted: Mon May 30, 2016 2:41 pm
by brunellopulix
Serge
it's here
viewtopic.php?f=15&t=2562

Brunello

Re: Dynamic Controls - a good idea

Posted: Mon May 30, 2016 8:49 pm
by EduardoLuis
XRTF One of the best app made by Brunello.-
Thanks for remember it.-

Re: Dynamic Controls - a good idea

Posted: Tue May 31, 2016 4:30 am
by brunellopulix
Serge

excuse I confused BoxRTF with Test XRTF here is the test:

Procedure TestRtfBox()
M->RTF1 := 'This is a RtfBox Demo'
*
FV3_OpenModal('Documenti')
*
FV3_RtfBox('RTF1',400,200)
*
FV3_Show(2)
*
IF FV3_Result()


ENDIF
*
Return

Brunello

Re: Dynamic Controls - a good idea

Posted: Tue May 31, 2016 5:15 am
by mol
Fine!
But, When I define window with two controls eg. textboxes, how your system returns value of these textboxes?

Re: Dynamic Controls - a good idea

Posted: Tue May 31, 2016 7:39 am
by brunellopulix
Mol

example:

M->Text1 := 'blabla'
M->Text2 := 'blublu'

FV3_OpenModal(Test TextBox')
FV3_TextBox('TEXT1',100)
FV3_TextBox('TEXT2',100)
FV3_Show(2)
IF FV3_Result() // OK button pressed
MsgInfo(M->TEXT1)
MsgInfo(M->TEXT2)
ENDIF

take a look InputBox inside others.prg

Brunello

Re: Dynamic Controls - a good idea

Posted: Tue May 31, 2016 8:32 am
by mol
OK. Thanks for reply!