Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Undo/Redo Record (Read 2683 times)
ahmdsalh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Apr 16th, 2010
Undo/Redo Record
Nov 23rd, 2010 at 9:50am
Print Post  
1) How can i delete the last record from the Undo/Redo lists or how can i prevent an action from being recorded?

2) In aligning text in a box, some positions are missing, as i want to be able to align the text in one of the nine normal positions (Top Right, Top Center, Top Left, Middle Right, Middle Center, Middle Left, Bottom Right, Bottom Center, Bottom Left), so how can i do that?

Thanks for your support
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Undo/Redo Record
Reply #1 - Nov 23rd, 2010 at 3:52pm
Print Post  
1) It's a hack, but you can do that by setting UndoDepth to the number of undo records - 1 and resetting it back to the original value. You will also need to count the records from an UndoActionRecorded event handler.

2) The TextStyle value is passed to the Drawtext API function and you can use any combination of flags supported by it. Note that DT_BOTTOM also requires DT_SINGLELINE, so setting bottom right alignment will look like DT_SINGLELINE + DT_BOTTOM + DT_RIGHT, i.e.

' bottom right alignment
box.TextStyle = 32 + 8 + 2

where the flag values are listed below:

Code
Select All
#define DT_TOP			    0x00000000
#define DT_LEFT			   0x00000000
#define DT_CENTER			 0x00000001
#define DT_RIGHT			  0x00000002
#define DT_VCENTER			0x00000004
#define DT_BOTTOM			 0x00000008
#define DT_WORDBREAK		    0x00000010
#define DT_SINGLELINE		   0x00000020
#define DT_EXPANDTABS		   0x00000040
#define DT_TABSTOP			0x00000080
#define DT_NOCLIP			 0x00000100
#define DT_EXTERNALLEADING	    0x00000200
#define DT_CALCRECT		     0x00000400
#define DT_NOPREFIX		     0x00000800
#define DT_INTERNAL		     0x00001000 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint