Jump to content
Sign in to follow this  
BJJ

Show result on GUI

Recommended Posts

BJJ

Hmm..

In my Calculator we can see resoult in a MsgBox (popup)

Part of code

Func _Start ()
MsgBox ('0','Crimson V1.0','Kazda kulka powinna miec ' & _Result () & ' sily ', '0')

EndFunc

Func _Result ()
    
$sila1 = GUICtrlRead($sila)
$defens1 = GUICtrlRead($defens)
$kukly1 = GUICtrlRead($kukly)

$srednia = (($sila1 + $defens1) /2)
$wynik = ($srednia / $kukly1)

Return $wynik
EndFunc

but i want see result in GUI window

How to do that ??

Share this post


Link to post
Share on other sites
stampy

Add a label (or other control) and set data in the button function.

$lblResult = GUICtrlCreateLabel("", 56, 100, 140, 25);<<<<<<<<<<<<<<

Func _Start ()
;MsgBox ('0','Crimson V1.0','Kazda kulka powinna miec ' & _Result () & ' sily ', '0')
    GUICtrlSetData($lblResult,_Result());<<<<<<<<<<<<<<
EndFunc

Func _Result ()
    
$sila1 = GUICtrlRead($sila)
$defens1 = GUICtrlRead($defens)
$kukly1 = GUICtrlRead($kukly)

$srednia = (($sila1 + $defens1) /2)
$wynik = ($srednia / $kukly1)

Return $wynik
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.