forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Yeh! Table Element Grouping...
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Apr 06, 2007 6:30 pm    Post subject: Reply with quote

In the case of the edit box at the very least it would be nice to hide it if the scroll bar is moved.

I even tried checking for focus and and using the exit option on the Edit element but, because the script pauses while the scroll bar is depressed, it doesn't do anything. In fact, just clicking on the scroll bar doesn't even change the @focus() off of the Edit element.
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Apr 08, 2007 12:52 am    Post subject: Reply with quote

I decided that I will just disable the Scroll bars while the focus is on the Edit box.
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Tue Apr 17, 2007 3:33 pm    Post subject: Reply with quote

Any news on the DSU? I am waiting on this to finish my program(s). Thanks a bunch!!
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Apr 18, 2007 1:57 am    Post subject: Reply with quote

LiquidCode,

It's getting there however, I'm having issues with two of the functions. One of them I can live without but the other I need to be able to sort the groups.

Sorry this is taking so long but I have limited time to work on it. This is also not just a Listview Groups DSU. It's more of an extended Table DSU.

I has most of the Styles you've seen in the past on this forum e.g. GRIDLINES, FULLROWSELECT...etc. This part is done. I also have included IMAGE functions e.g SubItem images, State Images (these can have widths more than 16 pixels) and also Header Images. This part is also done.

Using some other functions I've included, will alow you easily code SubItem edit boxes.

My main holdup is with LVM_GETGROUPINFO. I'm having a hard time translating the Header text return string. I've been assuming (which might be my problem Wink ) that I have to use a WideCharToMultiByte function since I had to use a MultiByteToWideChar function to set the Header text with LVM_INSERTGROUP and both of these use the LVGROUP structure.

The other issue, which I'm sure is related to the above, is that I can't seem to change the group header text with LVM_SETGROUPINFO. I can however change the color of the text Smile

As soon as I get these worked out it's done.

If your plan for groups doesn't require any manipulation after the groups have been created, you can use the following with the attached DSU

Code:

# TGROUP ENABLEGROUPVIEW,<Table>

# TGROUP DISABLEGROUPVIEW,<Table>

# TGROUP INSERTGROUP,<Table>,<GroupID>,<Table Index>,<HeaderTx>

# TGROUP MOVEITEMTOGROUP,<Table>,<GroupID>,<tIndex>

# TGROUP MOVEGROUP,<Table>,<current gIndex>,<new gIndex>

# TGROUP REMOVEGROUP,<Table>,<GroupID>

# TGROUP REMOVEALLGROUPS,<Table>

# TGROUP SETGROUPMETRICS,<Table>,<option>,<value>
 #Note: <option> can be BORDERCOLOR,BORDERSIZE, or TEXTCOLOR
 #       BORDERCOLOR - doesn't work...
 #       BORDERSIZE - in pixels for "Left", "TOP" , "RIGHT", "BOTTOM"
 #       TEXTCOLOR - uses RGB format eg "255|255|255"

# @TGROUP(HASGROUP,<Table>,<GroupID>)

  #INCLUDE extTABLE.DSC
 
  DIALOG CREATE,Table Group Demo,-1,0,357,319
  DIALOG ADD,TABLE,TABLE1,20,17,323,235,Column 0[80]|Column 1[80]|Column 2[80]|Column 3[80]
  DIALOG ADD,BUTTON,Close,275,271,64,24,Close
  DIALOG ADD,BUTTON,UnGroup,275,170,64,24,UnGroup
  DIALOG ADD,BUTTON,Group,275,170,64,24,Group
  DIALOG SHOW

  # Add some items to the table

  LIST ADD,TABLE1,0/0@tab()0/1@tab()0/2@tab()0/3
  LIST ADD,TABLE1,0/1@tab()1/1@tab()1/2@tab()1/3
  LIST ADD,TABLE1,0/2@tab()2/1@tab()2/2@tab()2/3
  LIST ADD,TABLE1,0/3@tab()3/1@tab()3/2@tab()3/3
 
:EVLOOP
  wait event
  goto @event()
 
:UnGroupBUTTON 
 # TGROUP DISABLEGROUPVIEW,<Table>
  TGROUP DISABLEGROUPVIEW,table1
  Dialog show,group
  goto evloop
   
:GroupBUTTON 
 #  TGROUP ENABLEGROUPVIEW,<Table>
  TGROUP ENABLEGROUPVIEW,table1
  TGROUP SETGROUPMETRICS,Table1,TEXTCOLOR,255|0|0
  TGROUP SETGROUPMETRICS,Table1,BORDERSIZE,50,50,50,50
  Dialog hide,group

 # TGROUP INSERTGROUP,<Table>,<GroupID>,<Table Index>,<HeaderTx>
  TGROUP INSERTGROUP,TABLE1,0,0,GROUP ONE
  TGROUP INSERTGROUP,TABLE1,1,1,GROUP TWO
  TGROUP INSERTGROUP,TABLE1,2,2,GROUP THREE
 
 # TGROUP MOVEITEMTOGROUP,<Table>,<GroupID>,<Table Index>
  TGROUP MOVEITEMTOGROUP,TABLE1,0,0
  TGROUP MOVEITEMTOGROUP,TABLE1,0,2
  TGROUP MOVEITEMTOGROUP,TABLE1,1,1
  TGROUP MOVEITEMTOGROUP,TABLE1,2,3
 
  goto evloop
 
:CloseBUTTON
:Close
  exit




extTable.zip
 Description:

Download
 Filename:  extTable.zip
 Filesize:  28.17 KB
 Downloaded:  1588 Time(s)

Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed Apr 18, 2007 2:13 am    Post subject: Reply with quote

Sorry, I didn't mean to rush you. Embarassed I didn't mean for you to post anything if your not ready to. I'll play with this DSU, but I'll wait for the final one. Again, Sorry.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Apr 18, 2007 3:38 am    Post subject: Reply with quote

Aslan wrote:
My main holdup is with LVM_GETGROUPINFO. I'm having a hard time translating the Header text return string. I've been assuming (which might be my problem Wink ) that I have to use a WideCharToMultiByte function since I had to use a MultiByteToWideChar function to set the Header text with LVM_INSERTGROUP and both of these use the LVGROUP structure.

The other issue, which I'm sure is related to the above, is that I can't seem to change the group header text with LVM_SETGROUPINFO. I can however change the color of the text Smile


You are correct Aslan... There is no ASCII version for these Messages. You will need to convert the wide strings to ASCII to read them into VDS.
To read the wide string you need to jump past the very first byte and start at the second byte. The first byte is most likely a @chr(0) byte.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group