AutoHotkey Community

It is currently May 27th, 2012, 12:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: [module] Rebar 2.0c
PostPosted: November 10th, 2008, 9:48 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade

_________________
Image


Last edited by majkinetor on August 24th, 2009, 12:43 pm, edited 7 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2008, 11:49 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Very nice. 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2008, 11:57 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
Absolutely awesome!

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2008, 11:29 am 
Offline

Joined: September 23rd, 2008, 3:37 am
Posts: 49
wonderful! i needed this - thanks majkinetor


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 11th, 2008, 1:05 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
once more a very usefull module. thanks :D

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 7:27 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
v 2.0

- All gobals removed.
- Added 1 new API - SizeToRect.
- Docs updated
- Code style update and optmization.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 8:40 pm 
Offline

Joined: January 8th, 2007, 1:14 pm
Posts: 83
Firstly, i'd want to say THANKS. Secondly, i ran into error with the "_Test.ahk".

Image

Problem is with this line in "_Test.ahk", i think, with the "menu" part.

Code:
hMenu := Toolbar_Add(hGui, "OnToolbar", "menu" , 0, "x0")


I'm using the Toolbar 2.1, perhaps the Rebar example code is outdated?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2009, 5:47 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
I have changed the example _Splitter.ahk as below to make it like a vertical side bar, but the second band's title always can't be displayed on the most left like the first one, how can I do to freeze its position? BTW, my os is xp. But in Win2K, it's normal. Is it in relation to visual style?

In the vertical style, the band's width is equal to control's width , and if I want to fix the band's width, I have to set band's mH other than mW :) Why should be it mH(Minimum height), not L(Length)?

Another problem is that font color can't apply to the control embeded in the rebar.

And how to add a bg bitmap? option "BG test.bmp" can't change the bg. The pic path shoulde be specified absolute or relative?
Code:
#NoEnv
#SingleInstance, force
SetBatchLines, -1

   Gui, +LastFound +Resize
   hGui := WinExist()
   Gui, Show, w600 h300 hide
 
   Gui, Add, Edit, HWNDhEdit1 w350 h100
   Gui, Add, Edit, HWNDhEdit2 w350 h100
   
   hRebar := Rebar_Add(hGui, "fixedorder verticalgripper vertical bandborders varheight", "", "")   
   ReBar_AddBand(hRebar, hEdit1, "S gripperalways childedge", "mH 200", "T Edit1")
   ReBar_AddBand(hRebar, hEdit2,"S gripperalways childedge", "BG test.bmp", "mH 200", "T Edit2")

   Gui, Show
return


GuiSize:
   Rebar_ShowBand(hRebar, 1)   ;simiarl to autosize, will resize to width
   ;Rebar_ShowBand(hRebar, 2)   
   ;Rebar_SetBand(hRebar, 1, "mH 200" )
   ;Rebar_SetBand(hRebar, 2, "mH 200")
return

GuiClose:
   ExitApp
return


#include Rebar.ahk


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2009, 5:23 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Ill check out mentioned problems.

Thank you.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2009, 7:25 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Helo

I fixed _Test.ahk sample, it was referencing my working copy of Toolbar before.


2hugman
First of all, when you set style to vertical, gripper changes automatically. verticalgripper will change it to horizontal in that case :). Thats system. About MH MW and L, thats the system too so height in that case is expressed as width... :?: I know it kinda sux but you set this up only once so its not big deal. Its how the control works and I can only change its designed behavior to meet the desired one.

I will see whats wrong with BG in your case. It looks like regression bug.
In the meantime, Check out the sample you gave me, a bit modified to meet what I think is what you want. You can only click the Edit2 gripper to scroll the edit into the view. I also changed the font for you.


Code:
#NoEnv
#SingleInstance, force
SetBatchLines, -1

   Gui, +LastFound +Resize
   hGui := WinExist()
   Gui, Show, w600 h300 hide
 
   Gui, Font, italic bold
   Gui, Add, Edit, HWNDhEdit1 w350 h100
   Gui, Add, Edit, HWNDhEdit2 w350 h100
   
   hRebar := Rebar_Add(hGui, "fixedorder vertical bandborders varheight", "", "")   
   ReBar_AddBand(hRebar, hEdit1, "S childedge", "mH 200", "T Edit1")
   ReBar_AddBand(hRebar, hEdit2,"S gripperalways childedge", "BG test.bmp", "mH 200", "T Edit2")
   Rebar_SetBand(hRebar, 1, "MH 500" )
   Rebar_SetBand(hRebar, 2, "MH 500" )
   Gui, Show
return


GuiClose:
   ExitApp
return


#include Rebar.ahk


I don't know about first thing you mentioned. The title on the first band is always displayed here, I tested on XP64b and Vista 32b.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2009, 3:50 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
Hi, guy, I have waiting for your appearance all the time :)

Maybe the problem is about the option verticalgripper. If I don't specified it as your fixed sample does, the band's titles all remain in the center, and the position is not movable. However, in this case, it looks so ugly because of the deformed gripper.


Instead, If I specified it verticalgripper, only the first band's title appears in the most left and the other bands' titles text will be movable when clicking the title to minimize or maxmize the bands. But this happens only in winxp with visual style. In win2000 and 2003, without theme, all the titles text appear in the left and can't slide, which is what I want. So I guess whether it's in relation to visual style or not.

snap:
http://docs.google.com/View?id=ajgv2cckhv3z_39gc5d6mf6


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2009, 11:35 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
I think you have problem with how Vista displays Rebar.

XP displays gripper like your 2nd screen-shot, including the first band.

You are actually unhappy about the skin :wink:


When you set the vgripper option, you actually don't see gripper at all, but some border....

Perhaps the best option for you is to remove grippers and add custom control that can minimize/maximize the band.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2009, 5:26 pm 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
Now I am sure that all the problems is caused by the skin.

But it seems be not impossible to keep the gripper invisible and keep the capability of toggling maxmized and minimized band at the same time. Option 'nogripper' will disable the toggling.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2009, 5:39 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Yes, it will. You will need programatic toggling via hotkey, button or somthing similar.

Actually, there is solution to add complex controls in the band, but that requires Panel control which can keep other controls. Then, you set pannel to contain your own gripper (button for example), along with the control you want and add Panel to the band. However, Panel control is not yet fully functional so its best to accept limitations for now or change the app design.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2009, 8:30 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Version 2.0b

- Regression bug fixed: BG color (reported by hugman) (typo bug again :lol: :roll: )
- Splitter.ahk sample now sets the bg bitmap for combo to see it in action.

_________________
Image


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, Yahoo [Bot] and 6 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