Sign in to follow this  
Followers 0
forever

ChatWindow - what kind of control?

6 posts in this topic

#1 ·  Posted (edited)

I've got a Label in which a chatlog is displayed.

I wanted to ask if a Label is the best solution?

And: i cant get autoscrolling and scrollbars to work!

I added scrollbars but i cant click them, try urself:

#include <GuiConstants.au3>
#include <GuiTab.au3>


;opt("GUIOnEventMode", 1)
;Opt("GUICoordMode",0)
global $wintitel = "The Predictionizer", $chatwindowtext
HotKeySet("{ENTER}", "enterpressed")

$gui = GuiCreate($wintitel, 800, 400, 431,451 , $WS_POPUP, $WS_EX_LAYERED)

$bg = GUICtrlCreatePic ("images\bg.bmp", 0, 0, 800, 400)
GuiCtrlSetState($bg,$GUI_DISABLE)

$StatusTop = GuiCtrlCreateLabel("Predictionizer BETA", 23, 16, 540, 15, -1, $WS_EX_TRANSPARENT)

$btn_close = GUICtrlCreateLabel("", 767, 16, 13, 14, -1, $WS_EX_TRANSPARENT)
GUICtrlSetTip($btn_close, "Schließen")

$btn_mini = GUICtrlCreateLabel("", 753, 16, 13, 14, -1, $WS_EX_TRANSPARENT)
GUICtrlSetTip($btn_mini, "Minimieren")


$Inhalt = GUICtrlCreateTab(18, 32, 545, 353)
$News = GUICtrlCreateTabitem ("News")

;$Nachrichten = GuiCtrlCreateGroup("Nachrichten", 3, 8, 529, 313)

$IRC = GUICtrlCreateTabitem ("IRC")
;$Chat = GuiCtrlCreateGroup("Chat", 3, 8, 529, 313)

Global $ChatWindow, $InputBar, $ChatTree
$ChatWindow = GuiCtrlCreateLabel("ChatWindow", 19, 46, 384, 311, $WS_VSCROLL+$WS_HSCROLL, $WS_EX_TRANSPARENT)
$InputBar = GuiCtrlCreateInput("InputBar", 19, 363, 385, 21, -1, $WS_EX_TRANSPARENT)
$ChatTree = GUICtrlCreateTreeView(409, 45, 150, 337, -1, $WS_EX_CLIENTEDGE+$WS_EX_TRANSPARENT )


$Another = GUICtrlCreateTabitem ("Another")
;$Anderes = GuiCtrlCreateGroup("Anderes", 3, 8, 529, 313)
GUICtrlCreateTabitem ("")


;SET COLORS
GUICtrlSetColor ($ChatWindow, 0x0090FF)
GUICtrlSetBkColor ($ChatWindow, 0x000000)
GUICtrlSetColor ($InputBar, 0x0090FF)
GUICtrlSetBkColor ($InputBar, 0x000000)
GUICtrlSetColor ($ChatTree, 0x0090FF)
GUICtrlSetBkColor ($ChatTree, 0x000000)
GUICtrlSetColor ($StatusTop, 0x0090FF)
GUICtrlSetBkColor ($StatusTop, 0x000000)


GuiSetState(@SW_SHOW)
GUICtrlSetState($IRC,$GUI_SHOW)
Edited by forever

Share this post


Link to post
Share on other sites



$ChatWindow = GuiCtrlCreateInput("ChatWindow", 19, 46, 384, 311, $ES_ReadONLY+$ES_MULTILINE+$ES_AUTOVSCROLL+$WS_VSCROLL+$WS_HSCROLL, $WS_EX_TRANSPARENT)

I tried AUTOVSCROLL to have it scrolling down when there is new text, its not working. any suggestions?

Share this post


Link to post
Share on other sites

Not autoscrolling anyways.

Share this post


Link to post
Share on other sites

How about calling the _GUICtrlEditGetLineCount() and _GUICtrlEditLineScroll() functions after each write to the control? You could always wrap the whole lot into a function to keep things tidy.

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