Jump to content

Text in a window?


JohnDool
 Share

Recommended Posts

Hello,

I'm just starting with autoit. I have a question. How can I show a lot of text in a window, as information? By Creating a label you can't show much informatie. But that is what I want! How can I show the text in a window?

Can I make a text file, and displayed the text of the file in a window?

I hope somebody can help me.

Thanks a lot.

John

Link to comment
Share on other sites

maybe... GUICtrlCreateInput ?

[edit] scratch that.. I meant GUICtrlCreateEdit as azure pointed out.

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Link to comment
Share on other sites

@JohnDool

You can do it with label, just resize it ...

$win=GuiCreate("GUI",500,500)
$lbl=GuiCtrlCreateLabel("",5,5,490,490)
GuiSetState(@SW_SHOW,$win)

GuiCtrlSetData($lbl,"insert here your big text")

Or use edit :

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,"put here your big text")

Cheers, FireFox.

Link to comment
Share on other sites

@JohnDool

You can do it with label, just resize it ...

$win=GuiCreate("GUI",500,500)
$lbl=GuiCtrlCreateLabel("",5,5,490,490)
GuiSetState(@SW_SHOW,$win)

GuiCtrlSetData($lbl,"insert here your big text")

Or use edit :

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,"put here your big text")

Cheers, FireFox.

Thanks for answer! I tried and I understand how it work. But I'm very unpleasant... Because my text add punctuation marks and calculations. How can I show that in a window or GUI? Is that possible? Or have I to program with HTML or PHP? Is it possible to show a textfile with al the punctuation marks and calculations in a GUI?

My second question: wich control can I make formulas?

Thanks for helping me.

Kind regards,

John

Link to comment
Share on other sites

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,FileRead("yourfile.ext"))

For calc look at Number()

Cheers, FireFox.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...