AutoHotkey Community

It is currently May 27th, 2012, 10:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: December 24th, 2007, 6:27 pm 
Offline

Joined: November 24th, 2007, 9:07 pm
Posts: 774
This is turning out very nice. I'm going to start using it when text in multiple formats is required in my GUIs :) Thanks!

Update: One suggestion I have would be to add an "options" parameter to the function so that you can specify other GUI options you'd like to apply to the controls that are added.

In my case, for instance, I need to add the "hidden" option to them in certain instances (to be shown later). I've added the option to the function, but just thought it might be nice if it were standard :)

Update 2: Also, I don't know if this is common, but I have a need to assign a variable to my text controls in my SteamWin windows (in order for them to be controlled by my custom tab control). I can specify it in the options parameter I added with "vVariable" but then the variable has to be global inside the HTMLText function.

My workaround:
Code:
local AllText, Tags, Tag, FirstPos, Test, Pos, Started, EndTrim, ETag, Length, Text2

_________________
Ben

My Trac projects
My Wiki
[Broken] - My music


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2007, 8:46 pm 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
Quote:
In my case, for instance, I need to add the "hidden" option to them in certain instances (to be shown later). I've added the option to the function, but just thought it might be nice if it were standard


which command are you using to hide them and what are you using them hidden for?

Quote:
Also, I don't know if this is common, but I have a need to assign a variable to my text controls in my SteamWin windows (in order for them to be controlled by my custom tab control). I can specify it in the options parameter I added with "vVariable" but then the variable has to be global inside the HTMLText function.


In the function I use the classnn rather than the variable because variables are not so nice for controls inside functions. The problem with setting a variable is that each word will have a different variable. I can easily add this ability in with only 2 lines if wanted.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2007, 8:51 pm 
Offline

Joined: November 24th, 2007, 9:07 pm
Posts: 774
When switching the function's variables to local and adding a variable to the Gui, Add, Text elements, it seems to work fine for my application at least. But that was because I only used one command so far, <i> :)

So yeah, I guess if I need complex text this won't work in my tab controls currently :(

The command I'm using to hide them is adding the word "hidden" to the options when it's created.

This is how I draw my custom tab control's elements for everything on the 2nd and subsequent tabs so that they are initially hidden and don't have to flash on the screen before being hidden by some other means.

Then I add all of the variable names to a global that the tab functions reference to decide what to show and what to hide when switching tabs. So if each of them didn't have a variable, I wouldn't be able to show and hide them properly I don't think.


I wonder if there's some way I can avoid variables by using the classnns. But without already knowing how many items are being added by HTMLText I don't know if I'd be able to get all the proper elements added to the proper tab's global variable. Hmm...

Idea Maybe: Perhaps allowing the assigning of a variable in the HTMLText function and then making an array out of it, and assigning each text item to an array variable, and then returning the number of text items added? Or maybe setting ErrorLevel (or some uncommon global) to the number of text items added?

That way someone (me :) ) could determine afterward all of the items by knowing the base variable and having the number of items.

_________________
Ben

My Trac projects
My Wiki
[Broken] - My music


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2007, 2:17 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Perhaps easier and more controlable way is to simulate this via RichEdit.
The problem with this approach is that function is adding controls and you can't use it afterwards. With RichEdit, the same visuals can be achieved with single control that can be moved/shown/hidden with single command, and which text could be set any time.

BTW, something related to this is MsgBoxX

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 6th, 2010, 12:03 am 
Offline

Joined: December 10th, 2008, 3:56 am
Posts: 98
Hay, is there a way to make this work with a read only edit GUI control?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group