Resizing Custom UO

Hi,

I have created a Visual UO and put in on a Window. I would
like to allow the user to change the size of it by using the
mouse.

i've been playing around with the mousemove, lbuttonup and
lbuttondown event, but dont' seem to get it to work.

Does anybody have any ideas or a sample I could use.

Help will be greatly appreciated.

Arnoud
0
Arnoud
5/27/2010 2:51:26 PM
sybase.powerbuilder.objects 3160 articles. 0 followers. Follow

2 Replies
1250 Views

Similar Articles

[PageSpeed] 31
Get it on Google Play
Get it on Apple App Store

One solution is to do a lot of coding... wrap the UO control
with line or static text control that disguise to be a
border of the UO control, so, basically, you will have 8 pcs
of it. left,right,top, bottom and on 4 corners... but maybe
you can disregard the corners.

on each control, you have to add an event for
mousemove(pbm_mousemove), mouseup(pbm_lbuttonup) and
mousedown(pbm_lbuttondown).

On mousemove event, check for the keydown... like this:

If KeyDown(keyLeftButton!) Then
	This.x = Parent.PointerX()
End If

On mouseup, then resize the UO accordingly using the x and y
values of the control being moved.

On mousedown, do some trick to mimick the control as a
border to your UO control.

all controls that you wrap on your UO shares the same code.

Another solution, if your window contains only your UO
control or your UO size should be relative to the window
size, then you might want the user to resize the window only
instead of the UO, then just adjust the size the UO
accordingly relative to the window.

HTH

> Hi,
>
> I have created a Visual UO and put in on a Window. I would
> like to allow the user to change the size of it by using
> the mouse.
>
> i've been playing around with the mousemove, lbuttonup and
> lbuttondown event, but dont' seem to get it to work.
>
> Does anybody have any ideas or a sample I could use.
>
> Help will be greatly appreciated.
>
> Arnoud
0
Neil
5/28/2010 10:12:45 AM
The least code intensive solution would be to create a resizable (with 
border) child window, place your UO on it (make it's border lowered), put 
these 2 lines of code in the resize event of the window:
yourUO.width = newwidth
yourUO.height = newheight

and then just open this child window in the open event of the window in 
which You intended to have your UO.

<Arnoud Oortwijk> wrote in message 
news:4bfe86ee.1b5b.1681692777@sybase.com...
> Hi,
>
> I have created a Visual UO and put in on a Window. I would
> like to allow the user to change the size of it by using the
> mouse.
>
> i've been playing around with the mousemove, lbuttonup and
> lbuttondown event, but dont' seem to get it to work.
>
> Does anybody have any ideas or a sample I could use.
>
> Help will be greatly appreciated.
>
> Arnoud
> 


0
Philip
5/28/2010 5:21:20 PM
Reply:

Similar Artilces:

dynamically creating custom visual objects on custom visual objects
I'm trying to create a cvo on another cvo using the following script: uo_xyz luo luo = create uo_xyz luo.show() However the show() is returning a -1. Both objects are inherited from the userobject class. Any thoughts on why the show() isn't working? Is the a better why to do this? Development Environment: Windows XP PowerBuilder 9 Build 5507 Thanks in advance Eric You can NOT CREATE a userobject, only OpenUserObject it... -- This is a FAQ, read Help, then search www.groups.google.com/advanced_group_search pbm_thisusuallydoesnothelp:-)) ...

Object Datasource and Custom Object
Hey, I have an object datasource that populates a detailsview.  I know how to update the changes using a BLL method like so: public static UpdateUser(string Username, string Surname); However I would like to use the objects update() method ive created that essentially calls: public static UpdateUser(User user); The question is, how do I access the fields that are contained within the details view?  im guessing .FindControl() but i dont have the ID.  the other way I suppose is to itterate through all the controls within in it?  there must be a better way though? The ...

Resize objects in resize event
Hi, I have a window which has a few controls like a datawindow, treeview and user object. Now if the window is maximized or minimized what do I have to code on the resize event so that the controls become larger or smaller on the window according to the proportion they are currently on the screen. Thanks in advance Cathy In article <oeCPlufI#GA.159@forums.powersoft.com>, cathy@worldnet.att.net says... > Hi, > > I have a window which has a few controls like a datawindow, treeview and user > object. Now if the window is maximized or minimized what do I ha...

Custom Properties for Custom Objects
I have created a custom visual object that I would like to set up with a customized parameter that I could set at run time (similar to Visible, or Border). I know that other custom objects, ActiveX objects, and custom controls have their own properties, so how can I do this with a Custom Visual Object? Charles Sustek csustek@acep.org You can declare instance variables as properties for the object. You can scope them as public, protected, or private as needed. You can create methods on the object to manipulate the instance variables, if necessary as well. HTH, steve [...

Property returns "Object" object that contains custom objects
Hi, I had some difficulties on returning the property of a custom JavaScript Object. Assuming I had a JSObject ObjA that was created using JS_NewObject with my own JSClass ObjA_class. And ObjA_class has one property getObjBs that will return a JavaScript standard "Object" object. And I want this "Object" object has properties that names are same as each ObjB object's property "id" , and the value of each properties is ObjB object. e.g. There are 2 ObjB objects: student1 and student2. The ObjB has a propperty "id": student1.id...

Resizing a Custom-Visual UO with MOUSE at runtime
Is there any way to resize a "custom-visual" UserObject at runtime using a MOUSE - just like we resize a window? There is no Resize! BorderStyle for a custom-visual user-object. Has anyone tried this? Any API calls? Thanks! --- PowerObject! Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] SDN CodeXchange -- http://codexchange.sybase.com <PowerObject!> wrote in message news:1916D91A0FF1DBE70083A18185256D3C.0083A19285256D3C@webforums... > Is there any way to resize a "custom-visual" > UserObject at runtime us...

Resizing a Custom-Visual UO with MOUSE at runtime
Is there any way to resize a "Custom-Visual" UserObject at runtime using a MOUSE - just like we resize a Window? There is NO Resize! BorderStyle for a custom-visual user-object. Has anyone tried this? Any API calls? Thanks! --- PowerObject! You can probably mimic the behavior with a PFC splitter-like object. -- <hopethishelps/> Roy Kiesler [TeamSybase] SDN CodeXchange -- http://codexchange.sybase.com <PowerObject!> wrote in message news:D9BAC040D47B9B730083575E85256D3C.008357ED85256D3C@webforums... > Is there any way to resize a "Custom-...

Custom Object used with Profile Object
I have a custom object that inherits from CollectionBase and it does not successfully bind to GridViews or DropdownLists. My understanding is that that is because GridViews and Dropdownlists implement IEnumerable, therefore, if I want my custom object to bind to the gridview or the dropdownlist, I need to inherit from IEnumerable also, right? Whatever the answer is, I'm trying to learn what I need to do to get my custom object to bind to a gridview and a dropdownlist. I don't think this has anything to do with it, but I'm setting the value of a Profile object (ASP.NET 2.0) equal to th...

how to implement custom iterator for custom object
hello, folks: I implement a custom object which is a c/c++ object's wrapper.I need to iterator the object's property so I can use "for ...in" in javascript. I have found if I visit the object's property use iterator in js script. spiderMonkey will call the custom object's __iterator__ method. I guess the __iterator__ should return a "next" function. But I have no clue how to implement the "next" function in the c/c++ host implement. Anyone had ever do such things? Look at GPSEE's environment access object: http://cod...

powerbuilder com object vs pocketbuilder .... object
Our powerbuilder application is sending information to a feeding machine by calling a com object. Our program now runs on a mobile device. The software is written with pocketbuilder 2.04. Now we would also like to have the connection with this feeding machine. I talked to the supplier of the feeding machine. He told me that the com object was written in Visual studio C. The simplest solution for them would be to create a .Net object. Is this the way to go? Thanks Eric Up on CodeXChange we have a handful of "adapter" layers (sometimes called "shims&quo...

Custom object/class conversion/serialization to a string object
I have a custom object/class that has private data and I am trying to add logic to convert it to a string type or you might also call it serialization to string. Looks like the suggested way is to use JSGetObjectOps and use the defaultValue to convert to the appropriate type. However the documentation suggests that this is a internal feature. Am I making this more difficult that it is? Is there an easier way to do this? I already implemented the convert function (JS_ConvertStub) but looks like that is not being called by object.toString() or when I do a JSON.stringify. Thanks, B...

returning objects from an custom xpcom object to a web page
I have created XPCOM component with nsIClassInfo.flags = nsIClassInfo.DOM_OBJECT and is registered it as a "JavaScript global property" with nsICategoryManager. Hence the instance of this class is injected into all window objects, i.e. window.myXPComp. And I'm able to access the XPCOM component and call methods on it from any webpage domain. However, I can't access properties and methods of return XPCOM types, say nsIDomDocument or nsIInputStream, being returned by the method. I guess, since they aren't registered with "JavaScript Global property", I g...

Object reference not set to an instance of an object error with custom class
I've got a custom class like so;'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.42 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict Off Option Explicit On Imports System.Xml.Serialization Namespace Courses.Booking ' 'This source code was auto-generated by xs...

Object reference not set to an instance of an object on Designer for custom control
 HelloI am fairly new to .NET and have a problem - I hope someone can help me.I'm using VS2005 / .NET 2.0. I have a website that must support multiple languages. In a class library I created an interface and controls (like the button control, literal, checkbox etc.) that use this interface and overwrite the render function to give additional multilingual functionality to these controls. (I got my idea from the following website: http://www.codeproject.com/KB/aspnet/localization_websites.aspx).  After compiling the class library and including the created DLL into my website, I p...

Web resources about - Resizing Custom UO - sybase.powerbuilder.objects

ASP.NET Image Resizing & Cropping Module for IIS - Free & Open Source
Resize, watermark, crop, rotate and filter from the image URL. Usable from javascript, css, html, php, ruby, python, asp, asp.net, anything! ...

Recutting and Resizing Saw Teeth - with Paul Sellers - YouTube
No matter the reason, this video show you how simple it is to cut new saw teeth in any handsaw. Yes, that means from small dovetail saws to the ...

This Upcoming Jailbreak Tweak Allows For Notification Resizing
... you can’t see the above video, please click this link .) Source: Jailbreak Nation This Upcoming Jailbreak Tweak Allows For Notification Resizing ...

Apple exploring self-resizing keys for iPhone keyboard
A patent application revealed on Thursday shows that Apple may be working on improving the accuracy of the touchscreen keyboards featured in ...

Greenshot adds screenshot callouts, resizing, more
You might have missed it over the holidays, but just before Christmas the excellent screenshot tool Greenshot was updated to version 1.2 with ...

'Seam carving' photo resizing now for video
Researchers have shown 'seam carving' for expanding or shrinking photos while preserving important elements, but now it works on video, too. ...

This Resizing Of The Batter's Box Sponsored By The Three Stooges
Yesterday's White Sox home opener against the Tigers was delayed when Detroit slugger Miguel Cabrera noticed the batter's boxes weren't in the ...

Gmail 4.2.1 for Android adds easier resizing, swipe features and more
That leaked Gmail APK we peeked at a month or so ago turned out to be right on the money. Google has just released version 4.2.1 of the Gmail ...

Resizing
June 22 (Bloomberg) Citigroup Inc., the bank that's lost more than any other in the collapse of the U.S. mortgage market, plans to fire as much ...

Apple Seems Slightly More Apologetic as it Removes Page Resizing Code
Apple continues to make an absolutely huge mess of apologising to Samsung, with the Javascript that initially hid the legal correction from view ...

Resources last updated: 1/13/2016 11:04:02 PM