Jump to content
Sign in to follow this  
kjactive

List control don't resize that correct

Recommended Posts

I'm working with a GUICtrlCreateList and noticed that it do not resize vertical that correct when the resize is done manually and I was wondering - is this control fixed related to the lines value or some sort internal fix to cope lines in the control...

Kåre :)

Share this post


Link to post
Share on other sites

I'm working with a GUICtrlCreateList and noticed that it do not resize vertical that correct when the resize is done manually and I was wondering - is this control fixed related to the lines value or some sort internal fix to cope lines in the control...

Kåre :)

<{POST_SNAPBACK}>

as stated in the doc it should grow. can you post example that's demonstrate what it is wrong from your point of view

Thank :D

Share this post


Link to post
Share on other sites

Well yes, this is a striped down script only to show the trouble with the resize - try to vertical resize and as you see the control do not quiet follow the window, seems no problem with horizontal...

#include <GUIConstants.au3>

Opt("GUIResizeMode", 802)

$var = '303 193 185 334' ;x y w h start Preferences

Global $dm = StringSplit($var, " "),$Main

Intuition()

While 1

$msg = GUIGetMsg(1)

$tmp = WinGetPos($msg[1]) ;Check for window resize

Select

Case @error ; trap errors if the window is not found

Case $msg[0] = -3

ExitLoop

Case $tmp[2] <> $dm[3] OR $tmp[3] <> $dm[4]

$dm[3] = $tmp[2]

$dm[4] = $tmp[3]

GUIDelete($main)

Intuition()

EndSelect

WEnd

Exit

Func Intuition()

$Main = GuiCreate('Test', 180, 60, $dm[1], $dm[2],$WS_OVERLAPPEDWINDOW)

$fileM = GUICtrlCreateMenu ("&File")

$type = GUICtrlCreateButton("", 0, 0, 25, 25, 0x1040)

GUICtrlSetImage(-1,"shell32.dll", 54,0)

GUICtrlSetTip(-1, "Add external file to library")

$Edit = GUICtrlCreateList('',0, 24, $dm[3]-10, $dm[4]-74)

GuiSetState()

WinMove($Main,-1,$dm[1], $dm[2], $dm[3], $dm[4])

EndFunc

I also noticed that the popup test on buttons disapear when click on right mouse button when the text is on and do not come back before some other messages are returned - is this correct behave, not quiet regula, I think they should stay on...

KJ :)

Edited by kjactive

Share this post


Link to post
Share on other sites

You are not using the resizing function because in your message loop you delete and recreate the GUI. So it is normal you don't have a quiet follow of the window.

suppress your guidelete and Intuition in the loop.

You will it is still not working due to Opt("GUIResizeMode", 802) because 802 mean $GUI_DOCKALL (pos, size) so nothing will change during the resizing. You need to use $GUI_DOCKBORDERS (newly introduced in GuiConstants.au3 in 3.1.1.15) which could have been done before with BitOR($GUI_DOCLEFT,$GUI_DOCRIGHT,$GUI_DOCKTOP,$GUI_DOCKBOTTOM)= 102 :)

Share this post


Link to post
Share on other sites

No I'm not using the resize function - That's the point and then I discovered that the List control did a kind of random resize...

I delete the window and reload it with the list control over and over and the window and the control use the same preferences size variables / values but the control vertical size do not always match the window and looks like it's random fit...

Kj :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...