Topic: Style??
When I change the Background from the Style in the menu, all the panels and colors that I have used in my program changes in the background color. Is there a way to keep them in the colors that I have used ?
My Visual Database → General → Style??
When I change the Background from the Style in the menu, all the panels and colors that I have used in my program changes in the background color. Is there a way to keep them in the colors that I have used ?
If I understand the style mechanism correctly, then the answer is "no". But I solved this problem in a different way: I placed the TShape component on the form, and set the color I needed through the Brush.Color and Pen.Color properties.
Could you please send an axample?? I do not understand the TShape.
Thank you in advance
procedure Grid_AddFrame( AGrid: TdbStringGridEx; );
// add frame for table view
// as it turned out, if you just change the Border property, then this causes an unpleasant flicker,
// from which even double buffering does not save; so add a frame shape
var
tmpShape: TShape;
begin
// create a frame
tmpShape := TShape.Create(TComponent(AGrid).Owner);
// name consists of class prefix, personal name, and table view name
tmpShape.Name := T_SHAPE+GRID_FRAME_NAME+'_'+DeleteClassName(AGrid.Name);
tmpShape.Parent := AGrid.Parent;
tmpShape.Top := AGrid.Top;
tmpShape.Left := AGrid.Left;
tmpShape.Width := AGrid.Width;
tmpShape.Height := AGrid.Height;
tmpShape.Shape := stRectangle;
// set border color
tmpShape.Pen.Color := AGrid.Font.Color;
tmpShape.Pen.Width := GRID_FRAME_WIDTH;
// set shape color
tmpShape.Brush.Color := AGrid.Font.Color;
tmpShape.Anchors := akTop+akLeft+akBottom+akRight;
// adjust the size and appearance of the table view
AGrid.Left := AGrid.Left + GRID_FRAME_WIDTH;
AGrid.Top := AGrid.Top + GRID_FRAME_WIDTH;
AGrid.Width := AGrid.Width - 2*GRID_FRAME_WIDTH;
AGrid.Height := AGrid.Height - 2*GRID_FRAME_WIDTH;
AGrid.BorderStyle := bsNone;
end;
hello
try this if you want.
you can customise the script as you want.
procedure desactiver_style(var form:tform);
var
i:integer;
begin
form.styleelements:=0;
for i := 0 to form.componentCount - 1 do
begin
if form.Components[i] is Tdbedit then
begin
Tdbedit(form.Components[i]).styleelements:=0;;
end;
if (form.Components[i] is Tpanel) then
begin
Tpanel(form.Components[i]).styleelements:=0;
end;
if form.Components[i] is Tlabel then
begin
//Tlabel(form.Components[i]).styleelements:=0;;
end;
end;
begin
desactiver_style(Form1);
end.
Thank you all
Can we set the style using script ? I like to give the options of my clients to change they're themes
please visit K245's Page
I have a couple of articles on this topic. The first one that StateOne pointed out talks about changing styles from the application using a script. The following section explains how to add button images to a theme: https://k245.ru/mvdb/effekt-babochki.html
Hello K245;;;
is there way to connect mvd with sql server like we mvd connected with mysql
Hello K245;;;
is there way to connect mvd with sql server like we mvd connected with mysql
If you meant MS SQL server, then the answer is here: http://myvisualdatabase.com/forum/viewtopic.php?id=7098
I ran into the opposite problem: not all components have the StyleElements property available, apparently because of this, when creating a component programmatically, it is impossible to set a style for it. Specifically, it's TdbStringGridEx (Table Grid). It is very strange and sad that by default it is created without style. Does anyone know how to programmatically create stylish tables?
My Visual Database → General → Style??
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi