The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 GetNBox "Ok" Button
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TreeNode

64 Posts

Posted - 02/06/2010 :  4:10:09 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all,

is there a possibility to deactivate the "Ok" Button of a GetNBox Dialog,
as long the user entered valid input?

It would be nice if my EventHandler function proofs if entered data is valid,
and activate the "Ok" button.

Anyone a idea how to do this?




<!-- helping each other is a good thing...like TreeNode holding the branches and leaves of a Tree -->

Penn

China
644 Posts

Posted - 03/08/2010 :  04:09:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Maybe you can try to create an X-Function. Then you can control the OK button on the dialog of the X-Function. You can refer to this page for more details.

Penn
OriginLab Technical Services
Go to Top of Page

TreeNode

64 Posts

Posted - 03/14/2010 :  07:11:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn,

thank you for that hint. I have not been engaged with using X-Functions yet.
To consider a certain complexity of my project, I started trying to work objectoriented.
I imagined to build classes to encapsulate functionality of my use cases.

I have to realize a few use cases. Each of them needs to bring up a dialog, where user
have to input some data or change properties.

I am new to the buisness of programming. So I dont have much experience of handling a project
of certain compexity.

I started to read the manual of X-Functions, and think that this Framework is a very powerful
instrument. Think it would make things easier, and I dont have to think about the GUI.

So here is my question:
Would you recommend me to just build a X-Function for each of my use cases?

thanks



|-- TreeNode
...|-- a??
...|-- ha!!
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 03/14/2010 :  8:32:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, will be good to spend the time to learn X-Function, you can then focus on the functionality and less on the GUI.

XF can include your own .h so you can still have your classes.

In terms of organization, yes, create an XF for each of your task. You can share codes with your classes by putting them into .h that you can include into the XF code.

Please note that your .h should be placed in in the <UserFile>\OriginC\X-Functions\ subfolder so that you can include it by


#include "myclass.h"


The OC compiler will search in the following order:

1. <UserFile>\OriginC\X-Functions
2. <UserFile>\OriginC



CP

Go to Top of Page

TreeNode

64 Posts

Posted - 03/15/2010 :  03:09:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for that information. I will give it a try!


|-- TreeNode
...|-- a??
...|-- ha!!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000