` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Clarion in general: Adding Copy - Cut - Paste to entry fields
2004-07-20 -- Robert Peros
 
Newsgroups: softvelocity.clarion.language,softvelocity.public.clarion5x > > 2. Alert the right mouse and construct your own popup for the entry > > controls. > Is it possible? Popup is, of course. But copy/paste functionality isn't (i > could not do it ;^) It's easy.Something like that in: WM.Init after all 0{PROP:Alrt,100} = MouseRightUp != WindowComponent.SetAlerts or ALERT(MouseRightUp) + NEW(Popup) .... Popup.AddItem('-',Q.First,1,1) Popup.AddMenu(Q.Menu,PC.GetItems() + 1) !Menu 1 Popup.AddItem('Cut(spremi i brisi)' ,Q.First+1,2,Q.Level)!1 IF ~CLIPBOARD() !Nema pogodnog formata Popup.SetItemEnable(Q.First+4,False) !Disable Paste Funkciju ... In WM.Kill !=WindowComponent.Kill ...... DISPOSE(Popup) In WM.TakeEvent !=WindowComponent.TakeEvent CASE EVENT() OF EVENT:AlertKey IF KEYCODE(MouseRightUp) .....Exec(PopupClass.Ask()) / POPUP RETURN Level:Notify for eg. / !x Pop_Clipboard.Pop_Exec.Exec PROCEDURE(USHORT LastSelection.. CODE STRING CASE LastSelection OF Q.First + 1 !CUT = CtrlX SETCLIPBOARD(FOCUS(){PROP:ScreenText}) FOCUS(){PROP:ScreenText} = '' OF Q.First + 2 !COPY = CtrlC SETCLIPBOARD(FOCUS(){PROP:ScreenText}) OF Q.First + 3 !None SETCLIPBOARD(CLIPBOARD() & ',' & FOCUS(){PROP:ScreenText}) OF Q.First + 4 !PASTE = CtrlV FOCUS(){PROP:ScreenText} = CLIPBOARD() OF Q.First + 5 !DELETE = CtrlDel FOCUS(){PROP:ScreenText} = '' END !x RETURN NULL !NEMA Pop_Next Interface. Again ,create class with WindowComponent and in win.init run SELF.AddItem(MyDummyClass.WindowComponent) and forget about this.WM take care about rest (call,kill...) R.


Today is November 23, 2024, 2:21 am
This article has been viewed 35243 times.
Google search has resulted in 63 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: