Sign in to follow this  
Followers 0
Champak

Pic in label

4 posts in this topic

Is it possible to have a pic inside a label somehow? I basically need a pic to be flexible with variable text inside of a label, so I can't use guictrlcreatepic which requires positioning. Or somehow anchor the guictrlcreatepic with a particular word, and it moves according to where that word/character/anchor is?

Share this post


Link to post
Share on other sites



Is it possible to have a pic inside a label somehow? I basically need a pic to be flexible with variable text inside of a label, so I can't use guictrlcreatepic which requires positioning. Or somehow anchor the guictrlcreatepic with a particular word, and it moves according to where that word/character/anchor is?

use GUICtrlSetImage maybe?

Share this post


Link to post
Share on other sites

How is that even related to what he is talking about?

Global $File = @ScriptDir&"\AutoIt.jpg"

InetGet("http://tbn0.google.com/images?q=tbn:GWNfiNBOVzHAlM:http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_grey_800x600.jpg", @ScriptDir&"\AutoIt.jpg")

$GUI = GUICreate("Test", 150, 140)
$Picture = GUICtrlCreatePic($File, 0, 0)
$Label = GUICtrlCreateLabel("Picture", 50, 20)
GuiCtrlSetState($Picture, 0)
GUISetState(@SW_SHOW, $GUI)

While 1
    Switch GUIGetMsg()
        Case - 3
            Exit
    EndSwitch
WEnd

This solution was described in the help file.

Share this post


Link to post
Share on other sites

I don't think that's what he's looking for. You put a label inside a picture, he wants a picture inside a label. Or rather, as I understand it, he wants a picture to appear at a certain point within his label's text.

And no, there isn't really a way to do this as far as I know. The best alternative I could think of would be to use HTML in an embedded IE control on your GUI.

Share this post


Link to post
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
Sign in to follow this  
Followers 0