EditBox - Resizable
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
EditBox - Resizable
Hi HDT and others,
How about to add an option in EditBox to accept SizeProcedure and let to final users to resize this control
I have experienced adding WS_SIZEBOX at INITEDITBOX function in c_editbox.c and you can test this attached executable file and give your opinion if you want:
Sometimes users would need to size EditControl and at that time could be actioned an UDF (User Defined Function) which could allow to resize form or execute others routines following the EditBox resizing.
All for improvings that would all enjoyed it !
How about to add an option in EditBox to accept SizeProcedure and let to final users to resize this control
I have experienced adding WS_SIZEBOX at INITEDITBOX function in c_editbox.c and you can test this attached executable file and give your opinion if you want:
Sometimes users would need to size EditControl and at that time could be actioned an UDF (User Defined Function) which could allow to resize form or execute others routines following the EditBox resizing.
All for improvings that would all enjoyed it !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: EditBox - Resizable
This is a great Pablo !
Serge
Serge
There's nothing you can do that can't be done...
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
EditBox - Resizable
Good to know this could be useful.
Thank you for expressing opinions Serge !
Now shall see HDT reaction to evaluate for impletation in HMG.
Thank you for expressing opinions Serge !
Now shall see HDT reaction to evaluate for impletation in HMG.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: EditBox - Resizable
Nice sample!
But, It should be possibility to limit size by programmer, I think. (Maybe it's done?)
But, It should be possibility to limit size by programmer, I think. (Maybe it's done?)
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
EditBox - Resizable
Thank you Marek for your interest.
ON SIZE <{SizeProcedure}> as new property of control (new style).
I also was looking also for this: Its name is RESIZE CONTROL.
But I do not know how to do it. All these demmands need for HDT be approved and better implement.
Yes I also believe this could it be possible if EditControl could allow to insert something like this:mol wrote:But, It should be possibility to limit size by programmer, I think. (Maybe it's done?)
ON SIZE <{SizeProcedure}> as new property of control (new style).
I also was looking also for this: Its name is RESIZE CONTROL.
But I do not know how to do it. All these demmands need for HDT be approved and better implement.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
EditBox - Resizable
It is also posible to limit which can be allow for sizing side.
Thru WM_NCHITTEST can know it.
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Thru WM_NCHITTEST can know it.
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: EditBox - Resizable
In this example you move and resize a Grid control:
Code: Select all
#define WS_CAPTION 0x00C00000
#define WS_SIZEBOX 0x00040000
HMG_ChangeWindowStyle ( Form_1.Grid_1.Handle, WS_CAPTION + WS_SIZEBOX, NIL, .F., .T. )
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
EditBox - Resizable
Thanks Claudio,
So, you mean that no need to mess in HMG source code to get EditBox as Resizable with:
HMG_ChangeWindowStyle ( Form_1.Edit_1.Handle, WS_SIZEBOX, NIL, .F., .T. )
But what about with:
So, you mean that no need to mess in HMG source code to get EditBox as Resizable with:
HMG_ChangeWindowStyle ( Form_1.Edit_1.Handle, WS_SIZEBOX, NIL, .F., .T. )
Code: Select all
/*
* HMG - Harbour Win32 GUI library Demo
*
* Copyright 2010 Roberto Lopez <mail.box.hmg@gmail.com>
* http://www.hmgforum.com//
*/
#include "hmg.ch"
#define WS_CAPTION 0x00C00000
#define WS_SIZEBOX 0x00040000
Function Main
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'HMG Demo' ;
ICON 'DEMO.ICO' ;
MAIN
DEFINE STATUSBAR
STATUSITEM 'HMG Power Ready!'
END STATUSBAR
@ 30,10 EDITBOX Edit_1 ;
WIDTH 410 ;
HEIGHT 140 ;
VALUE 'EditBox!!' ;
TOOLTIP 'EditBox' ;
MAXLENGTH 255 ;
ON CHANGE ShowRowCol() ;
DISABLEDBACKCOLOR { 0,0,255} ;
nohscroll;
DISABLEDFONTCOLOR { 0,255,0 }
DEFINE BUTTON B
ROW 250
COL 10
WIDTH 130
CAPTION 'Set CaretPos'
ACTION ( Form_1.Edit_1.CaretPos := Val(InputBox('Set Caret Position','')) , Form_1.Edit_1.SetFocus )
END BUTTON
DEFINE BUTTON C
ROW 250
COL 150
WIDTH 130
CAPTION 'Set ReadOnly .T.'
ACTION Form_1.Edit_1.ReadOnly := .T.
END BUTTON
DEFINE BUTTON D
ROW 250
COL 290
WIDTH 130
CAPTION 'Set ReadOnly .F.'
ACTION Form_1.Edit_1.ReadOnly := .F.
END BUTTON
DEFINE BUTTON E
ROW 250
COL 430
WIDTH 130
CAPTION 'Set Resizable'
ACTION HMG_ChangeWindowStyle ( Form_1.Edit_1.Handle, WS_SIZEBOX, NIL, .F., .T. )
END BUTTON
END WINDOW
Form_1.Center()
Form_1.Activate()
Return Nil
Procedure ShowRowCol
Local s , c , i , e , q
s := Form_1.Edit_1.Value
c := Form_1.Edit_1.CaretPos
e := 0
q := 0
for i := 1 to c
if substr ( s , i , 1 ) == chr(13)
e++
q := 0
Else
q++
EndIf
Next i
Form_1.StatusBar.Item(1) := 'Row: ' + alltrim(Str(e+1)) + ' Col: ' + alltrim(Str(q))
Return
AndPablo César wrote:Yes I also believe this could it be possible if EditControl could allow to insert something like this:Mol wrote:But, It should be possibility to limit size by programmer, I think. (Maybe it's done?)
ON SIZE <{SizeProcedure}> as new property of control (new style).
Is it posible to insert UDF in On Sizing event ?Pablo César wrote:Sometimes users would need to size EditControl and at that time could be actioned an UDF (User Defined Function) which could allow to resize form or execute others routines following the EditBox resizing.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: EditBox - Resizable
I'm using resizing of labels in my label manager. I forgot about this solution
Re: EditBox - Resizable
Hola
Yo creo que el problema va a estar en como manejar o controlar hasta donde se puede hacer
"Resize" del control ya que afectaría a los demás controles que estan alrededor.
------------------------------------------------------------------------------------------------------------
hello
I think the problem will be how to manage or control up to where you can do
"Resize" control as it would affect the other controls that are around.
Yo creo que el problema va a estar en como manejar o controlar hasta donde se puede hacer
"Resize" del control ya que afectaría a los demás controles que estan alrededor.
------------------------------------------------------------------------------------------------------------
hello
I think the problem will be how to manage or control up to where you can do
"Resize" control as it would affect the other controls that are around.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.