System dialogs

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
farrukhshahzad
Posts: 17
Joined: Wed Mar 27, 2013 1:49 pm

System dialogs

Post by farrukhshahzad »

How can we use system dialog (like the one appear on max or min value of Analog numeric) in script.

Can we have form designed with vertical scroll bar? I need to enter list of items on the form which may take more space than one screen.

farrukhshahzad
Posts: 17
Joined: Wed Mar 27, 2013 1:49 pm

Re: System dialogs

Post by farrukhshahzad »

I mean the dialog like in the attached image. Can we access similar dialog via script?
Attachments
dialog.jpg
dialog.jpg (8.59 KiB) Viewed 12352 times

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: System dialogs

Post by Edmund »

Well I haven’t heard or seen anything about it so It´s probably not meant to be used from anything else than the built in functions.

But there is a way to use them anyhow.

Code: Select all

Neo.ApplicationFramework.Tools.Messagebox.MessageBoxFX.Show(System.IntPtr.Zero, "I´m a iX-Message :)");
Messagebox.png
Messagebox.png (10.09 KiB) Viewed 12342 times

Code: Select all

Neo.ApplicationFramework.Tools.Messagebox.MessageBoxFX.Show(System.IntPtr.Zero, "I´m another iX-Message :)", "Test Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
Messagebox_2.png
Messagebox_2.png (16.15 KiB) Viewed 12342 times
The methods wants a pointer to the owner of the window but I have only set it to zero.

Please note! I have no idea of what problems / error this can cause in your application (because of the lack of documentation), and I have only tested this for PC-targets.
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

farrukhshahzad
Posts: 17
Joined: Wed Mar 27, 2013 1:49 pm

Re: System dialogs

Post by farrukhshahzad »

Thanks.

I am trying on T7A target, but getting error that I am missing an assembly..

using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using System.Windows;
using System.IO;

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: System dialogs

Post by Edmund »

Well that´s because your target is a panel with Windows CE and Compact framework... And WPF is not available there.

There is also a class called MessageBoxCF, have a try at that (I have never tried it).

Why are you not using the "ordinary" message box function i .Net?
Edmund Andersson

AITECH AB

Part of Beijer Integrator Group

filou
Posts: 22
Joined: Thu May 03, 2012 11:06 am

Re: System dialogs

Post by filou »

Hi,

I confirm the proposal from Edmund, you can use the MessageBoxCF, like the these example:

// you have to use this directive
using Neo.ApplicationFramework.Tools.Messagebox;

// Dialog with 3.5s timer:
MessageBoxCF DialogBoxLoad = new MessageBoxCF("Text1", "Text2", 3500);
DialogBoxLoad.Show();
Picture 1.jpeg
Picture 1.jpeg (8.55 KiB) Viewed 12327 times
or

// Dialog with OK and an Icon:
MessageBoxCF DialogBoxText3Text4 = new MessageBoxCF("xxxxxxxxxxxxxx", "yyyyyyyyyyyyyyyyyyy", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
DialogBoxText3Text4.Show();
Picture 2.jpeg
Picture 2.jpeg (20.77 KiB) Viewed 12327 times
Bye
Philippe

farrukhshahzad
Posts: 17
Joined: Wed Mar 27, 2013 1:49 pm

Re: System dialogs

Post by farrukhshahzad »

Thanks a lot.

Can we have form designed with vertical scroll bar? I need to enter list of items on the form which may take more space than one screen.

kim
Posts: 15
Joined: Fri Feb 03, 2012 11:38 am

Re: System dialogs

Post by kim »

Hi

I am interested in using MessageBoxCF (with X2 terminal), but what feature does it allow? Can I have buttons Yes/No + the timer function?

And perhaps a stupid question, but how do I read if operator pressed Yes or No with this message box type?

btw, it seems MessageBoxFX is not available anymore in iX 2.40


Thanx!

Post Reply