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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Dialog box with image

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
achu6393 Posted - 11/09/2016 : 07:59:26 AM
Hello all,

I am trying to create and display a help document for my user defined toolbar. So the idea is to have an help icon in my own toolbar and on clicking it should open a dialog box that shows which icon represents what. Therefore, I would like to display the pictures of the icon in the dialog box along with its function in text. How can I acheive this?

Also, Is it possible to program such a way that the click of the help icon opens an external readme pdf file?

Thanks in advance!
-Akki

Origin Ver. 2016 and Service Release 9.3
Operating System:win 7

such coding! much wow!
6   L A T E S T    R E P L I E S    (Newest First)
achu6393 Posted - 11/18/2016 : 08:29:57 AM
Hello Fujii,

Thank you for your support.

-Akki

such coding! much wow!
Hideo Fujii Posted - 11/16/2016 : 4:58:55 PM
Hi Akki

To close the appeared window, you can make another button which contains the following 1-line script:
win -cd %H;

Regarding to open a PDF document, you can also make a button which load the browser with the script:
win -aw "file:///%Y<your_pdfFile>.pdf"



Here, %Y indicates the path of your "User Files Folder", and you can put a hardwired path, if you like.
Also, of course, the button doesn't have to be a text label, but can be an image.

Hope this helps.

--Hideo Fujii
OriginLab
achu6393 Posted - 11/14/2016 : 09:16:51 AM
Hello fujii,

Thank you! It helped a lot.

However, I have another question. Is it possible to avoid the prompt window which shows up every time I close the graph window?

Also, the externally opening an pdf file is not possible?

-Akki

such coding! much wow!
Hideo Fujii Posted - 11/11/2016 : 2:30:21 PM
Hi achu6393,

There may be various ways, and the following may be the one - making a graph template (hiding all axes and labels),
and your button opens it):

1) Make a completely empty graph window; Delete every axis, tick label, legend by selecting and pressing DELETE key.
2) Paste the icon images and text labels in this page. (In the sample below, I hid the layer icon
by "View: Show: Layout Icon" menu.)
3) Save this graph page as a graph template ("File: Save template As" menu (in my sample, to creates HelpSample1.otp).
4) Make your own tool button, which runs the following three-line script:
/////////////////////////////////////////////////////
  window -t plot HelpSample1;  //Load template
  page.label$="Help Information";  //Add long name
  page.title=1;  //Hide short name
/////////////////////////////////////////////////////



Hope this approach works for you.

--Hideo Fujii
OriginLab

P.S. In this approach, you can not only show icon images, but also put them as buttons to run a script to do something.
achu6393 Posted - 11/09/2016 : 4:09:57 PM
hello Fujii,

I am sorry for not being so clear with my problem. I donot want the icon to change dynamically but for example if I have a custom toolbar like:



and when I click the 'i' icon I should get another pop up dialog box which contains the icons and its corresponding function:



or another option when clicking the 'i' icon it open a pdf file having the same data.

Thank you.

such coding! much wow!
Hideo Fujii Posted - 11/09/2016 : 2:28:45 PM
Hi achu6393,

If I'm correct, there is no way to change the icon image dynamically for the tool button to make
it reflect the internal state.

One possible work-around may be to show any sign (e.g., by loading a predefined graphic image
in a layout window) according to the state.
I mean, for example, like the following snippet:
[Main]
	Switch(myAppStatus) {
          case 0 :
            type -b You're in the Initial state;
            myAppStatus=1; //Set the status to 1st stage
            Break;
          case 1:
            type -b You're in the Next state;
            myAppStatus=""; //Set the status to NIL
            Break;
          default:
            type -b You're in the NIL state;
            myAppStatus=0; //Set the status to 1st stage
            Break;
}

Once you put this [Main] section in Custom.ogs script file in the User Files Folder; then every time
you press the Custom Routine button, the message changes accordingly.

Hope this hints something.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000